Issue metadata
Sign in to add a comment
|
Ability to style up input::-webkit-datetime-edit-year-field[disabled]
Reported by
rice.coo...@gmail.com,
Apr 21 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36
Example URL:
Steps to reproduce the problem:
HTML:
<input type=date value=1970-01-01>
<input type=date value=1970-01-01 min=1970-01-01 max=1970-02-01>
CSS:
input::-webkit-datetime-edit-year-field
{
color: green;
}
input::-webkit-datetime-edit-year-field[disabled]
{
color: red;
}
Demo on CodePen:
http://codepen.io/marek-saji/pen/LNrwxo?editors=1100
What is the expected behavior?
Year in the first input is green and in the second one — red.
What went wrong?
Both years are green.
Does it occur on multiple sites: N/A
Is it a problem with a plugin? N/A
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 50.0.2661.75 Channel: stable
OS Version: Ubuntu 15.10
Flash Version: Shockwave Flash 21.0 r0
In devtools (after enabling “Show user agent shadow DOM”) one can see that user agent styles disabled fields as follows:
input::-webkit-datetime-edit-year-field[disabled], input::-webkit-datetime-edit-month-field[disabled], input::-webkit-datetime-edit-week-field[disabled], input::-webkit-datetime-edit-day-field[disabled], input::-webkit-datetime-edit-ampm-field[disabled], input::-webkit-datetime-edit-hour-field[disabled], input::-webkit-datetime-edit-millisecond-field[disabled], input::-webkit-datetime-edit-minute-field[disabled], input::-webkit-datetime-edit-second-field[disabled] {
color: graytext;
}
but using the same selector does not work.
,
Apr 22 2016
,
Apr 22 2016
This was an intentional change. The selector in the demo is relying on the fact that there is an element in the UA shadow tree for showing the year which uses an attribute named "disabled" to show different styles when it's editable or not. If the UA shadow implementation changed, the selector would stop working anyway. This has been discussed on blink-dev before for author added generated content in UA shadow dom with ::before/::after which is now also prohibited. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ashej...@chromium.org
, Apr 22 2016Labels: -OS-Linux -Pri-2 -Type-Compat hasbisect BlinkCSS M-52 OS-All Pri-1 Type-Bug-Regression
Owner: r...@opera.com
Status: Assigned (was: Unconfirmed)