Re: [csswg-drafts] [cssom] How safe is it really to shorthandify properties? (#8398)

For what it's worth, there are precedents like `text-decoration`, which was a [longhand in CSS 2.1](https://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-decoration) but got turned into a [shorthand in CSS Text Decoration 3](https://drafts.csswg.org/css-text-decor-3/#text-decoration-property). Also `text-align` got turned into a [shorthand in CSS Text 3](https://drafts.csswg.org/css-text-3/#text-align-property) while it was a [longhand in CSS 2.1](https://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#propdef-text-align). And to go away from text related styling, `overflow` was initially defined as a [longhand in CSS 2.1](https://www.w3.org/TR/2011/REC-CSS2-20110607/visufx.html#propdef-overflow). In CSS Overflow 3 it then got [turned into a shorthand](https://drafts.csswg.org/css-overflow-3/#propdef-overflow).

So this is nothing new. So, any changes to CSSOM should take that into account. An API change like adding shorthands to the enumeration might break some logic. Admittedly, the risk for that is probably very low, though it should be considered, nonetheless.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8398#issuecomment-1416856558 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 4 February 2023 21:42:43 UTC