Reset button on input[type=date] should inherit color
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
People
(Reporter: me, Assigned: heycam)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Example: https://jsfiddle.net/silverwind/j716y8tm/
A simple fix could be this in toolkit/content/widgets/datetimebox.css:
.datetime-reset-button {
color: inherit;
}
I don't know why it does not inherit by default, might be something shadow-dom specific.
| Reporter | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
This is a regression from bug 1317581.
| Assignee | ||
Comment 3•5 years ago
|
||
(In reply to silverwind from comment #0)
A simple fix could be this in
toolkit/content/widgets/datetimebox.css:.datetime-reset-button { color: inherit; }I don't know why it does not inherit by default, might be something shadow-dom specific.
It's because the button matches a rule from the UA style sheet that sets color: buttontext.
I didn't realize that the reset button is rendered as a single SVG path with opacity. I'm not sure if that is the desired appearance (i.e. something that adapts to the color of the text), but if it is, then your fix is correct.
| Assignee | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•5 years ago
|
||
| bugherder | ||
| Reporter | ||
Comment 7•5 years ago
|
||
I'm not sure if that is the desired appearance (i.e. something that adapts to the color of the text), but if it is, then your fix is correct.
I think it's generally desirable that these indicators follow the text color to give authors some leverage over its color which is important for dark themes where black on near-black will not give sufficient contrast. Notably, Blink also seems to have the same issue with the date icon on the same fiddle.
Ideally, I'd like to see a way for authors to style these elements. I think it could be done by exposing Shadow-DOM parts using <button part="reset-button"> that authors can then target using input[type="date"]::part(reset-button).
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 8•5 years ago
|
||
(In reply to silverwind from comment #7)
Ideally, I'd like to see a way for authors to style these elements. I think it could be done by exposing Shadow-DOM parts using
<button part="reset-button">that authors can then target usinginput[type="date"]::part(reset-button).
Yes, I think some way of styling the reset button -- or inserting your own into an unstyled control -- is needed. Discussion about stylability of form controls is happening as part of https://github.com/WICG/open-ui.
Comment 9•5 years ago
|
||
The patch landed in nightly and beta is affected.
:heycam, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Updated•5 years ago
|
Description
•