RESOLVED FIXED 192922
CSS variables don't work for colors in "border" property
https://bugs.webkit.org/show_bug.cgi?id=192922
Summary CSS variables don't work for colors in "border" property
Nikita Vasilyev
Reported 2018-12-20 00:49:14 PST
Created attachment 357798 [details] [HTML] Reduction See the reduction. In Chrome both rectangles have a green border. In STP 72, only the first one.
Attachments
[HTML] Reduction (423 bytes, text/html)
2018-12-20 00:49 PST, Nikita Vasilyev
no flags
Patch (3.43 KB, patch)
2018-12-21 11:56 PST, Justin Michaud
no flags
Radar WebKit Bug Importer
Comment 1 2018-12-20 11:43:29 PST
Joseph Pecoraro
Comment 2 2018-12-20 11:58:17 PST
Actually this appears to just be the order of properties in the `border` shorthand: Note that this works: border: hsl(100, 100%, var(--foreground-lightness)) 4px solid; But not this: border: 4px solid hsl(100, 100%, var(--foreground-lightness));
Justin Michaud
Comment 3 2018-12-21 10:46:31 PST
This works: .fail { --foreground: 100; border: 4px rgb(100, 0, var(--foreground)) dashed; } This does not: .fail { --foreground: 100; border: 4px dashed rgb(100, 0, var(--foreground)); } The reason is that in the first case, in CSSPropertyParser::consumeBorder, we do not consume the entire value and so consuming the border fails. In the second case, consuming the border does not fail. In CSSPropertyParser::parseValueStart, we expect the parsing to fail in order to fall through to the variable reference parser.
Justin Michaud
Comment 4 2018-12-21 11:56:05 PST
WebKit Commit Bot
Comment 5 2018-12-21 13:33:12 PST
Comment on attachment 357962 [details] Patch Clearing flags on attachment: 357962 Committed r239516: <https://trac.webkit.org/changeset/239516>
WebKit Commit Bot
Comment 6 2018-12-21 13:33:13 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.