Re: [csswg-drafts] [css-backgrounds-4] Clarify serialization of `box-shadow-*` (#8566)

Serializing to `0px 0px` is not backwards compatible. Currently, browsers even _expand_ the computed value in some cases, which seems to contradict the [principle to make the serialization as short as possible without changing the value's meaning](https://drafts.csswg.org/cssom/#serializing-css-values).

First, it should be clarified if changes to the serialization can cause web compat issues in this case.

Anyway, here's my take on your question:

1. `box-shadow-offset: none` => specified: `none`, computed: `none` (like for `box-shadow` now)
2. `box-shadow-offset: 0px 0px` => specified: `0px 0px`, computed: `0px 0px` (like for `box-shadow` now)
3. `box-shadow: none` => specified: `none`, computed: `none` (like now)
4. `box-shadow: currentColor none` => specified: `currentcolor none`, computed: `none` (currently invalid, so probably no compat issues; currently: specified: ``, computed: `none`)
5. `box-shadow: currentColor 0px 0px` => specified: `currentcolor 0px 0px`, computed: `rgb(0, 0, 0) 0px 0px 0px 0px` (like now), though if possible to correct, computed: `0px 0px`

Sebastian

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


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

Received on Tuesday, 14 March 2023 23:20:30 UTC