Discussion:
[css-cascade] do longhands cascade shorthands?
(too old to reply)
Dennis Heuer
2018-01-11 00:35:14 UTC
Permalink
Hello
From https://www.w3.org/TR/css3-cascade I can't read how the
following cascading behaves:

text-decoration: none;
text-decoration-color: blue;

Will the second expression add to the first or win over it?

Regards,
---------------------------------------------------------------------
Dennis Heuer
***@verschwendbare-verweise.seinswende.de
Xidorn Quan
2018-01-12 08:30:35 UTC
Permalink
Post by Dennis Heuer
Hello
From https://www.w3.org/TR/css3-cascade I can't read how the
text-decoration: none;
text-decoration-color: blue;
Will the second expression add to the first or win over it?
Shorthands never cascade as themselves. They are expanded to corresponding longhands during parsing.
Post by Dennis Heuer
/* these three are expanded from `text-decoration` declaration */
text-decoration-line: none;
text-decoration-color: currentcolor;
text-decoration-style: solid;
/* this one is the longhand declaration */
text-decoration-color: blue;
- Xidorn

Loading...