[css-pseudo] implement ::file-chooser-button
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: roy-orbison, Assigned: emilio)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Webkit has ::-webkit-file-upload-button
, IE has ::-ms-browse
, leaving Gecko/Quantum as the only major rendering engine without the ability to style the button component of the <input type=file>
control.
::-moz-file-upload-button
would be great for platform parity. I know there are workarounds using <label>
that can still render any button one likes, but they rely on script to parse the selected filename(s) and insert them into the DOM. It's not a clean solution compared to the native control.
Assignee | ||
Comment 1•4 years ago
|
||
This would be better as a feature request to the CSS Working Group: https://github.com/w3c/csswg-drafts/issues/new
This is relatively simple to add, but we try to avoid adding new vendor-prefixed things to the platform.
Assignee | ||
Comment 2•4 years ago
|
||
Looks like there was no objection from the working group! The name may be a bit under discussion so I'll only enable it on nightly / beta until the dust settles a bit.
Assignee | ||
Comment 3•4 years ago
|
||
As per https://github.com/w3c/csswg-drafts/issues/5049.
Don't enable it unconditionally just yet, as the name may change, and I
need to write an intent email :)
Assignee | ||
Comment 4•4 years ago
|
||
James, the WPT lint is angry at me because I didn't include a link to a spec in a reftest. But there's no spec (yet) and the test has .tentative.html in the name. Do you know how should I proceed here?
Comment 5•4 years ago
|
||
Once implemented, this should be added to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features.
Sebastian
Comment 6•4 years ago
|
||
The lint is no longer grumpy about the lack of a link.
Comment 7•4 years ago
|
||
Or, I guess that's true upstream but not yet in m-c. If this is blocking you and the sync is too slow to wait for I can cherry-pick that commit into central (guess the sync will be a couple of days at least).
Assignee | ||
Comment 8•4 years ago
|
||
I can wait, I need to wait for bug 1639852 to get reviewed first. Thanks!
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/82df6f70ec60 Implement the ::file-chooser-button pseudo-element. r=jwatt
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/23751 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 12•4 years ago
|
||
Backed out for lint failure on file-chooser-button-001.tentative.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/9b5d151a83b7d94170f1d094f4a1959bad9d8c91
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303601508&repo=autoland&lineNumber=47
Upstream PR was closed without merging
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ff6c38ffa425 Implement the ::file-chooser-button pseudo-element. r=jwatt
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 16•4 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•4 years ago
|
Comment 18•4 years ago
|
||
I have updated BCD to rename the -webkit
version, and add that as an old name for this standardized pseudo.
Also moved the property page, and added examples of using the standard version, and standard version with a fallback of the -webkit
version: https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/::file-selector-button
Description
•