background
shorthand produces invalid CSS
#165
Labels
type: bug
Something that should function correctly isn't.
type: enhancement
A new feature or addition.
Describe the bug
The
background
"shorthand" function produces invalid CSS.To Reproduce
For example...
...is rendered as...
...even though the correct syntax, per the CSS Backgrounds and Borders Module Level 3 specification, is...
Another example relates to
background-origin
andbackground-clip
:...is rendered as (comment mine, per spec)...
Notice that the
background-origin
andbackground-clip
values are reversed.Proposal
I'm not sure the
background
"shorthand" function saves much code, if any at all, compared to setting the constituent properties individually. At the same time, it doesn't offer much type safety and, as demonstrated, produces inaccurate results.For the moment, I lean toward scrapping this API altogether.
Alternatively:
<bg-size>
in the absence of a<bg-position>
(spec).font
shorthand property should probably be reimplemented with a similar API at the same time to avoid inconsistent API design.The text was updated successfully, but these errors were encountered: