Re: [csswg-drafts] [cssom] Serialization of style when shorthands set properties to their initial values (#8198)

Firefox serializes to `border-color: currentcolor; border-style: none; border-width: 1px 2px 3px 4px;`. Serializing only to `border-width` is clearly incorrect (doesn't round-trip).

Given the canonical order in [the spec](https://drafts.csswg.org/css2/#border-shorthand-properties) is width, then style, then color, I believe the right serialization should be `border-width: 1px 2px 3px 4px; border-style: none; border-color: currentcolor;`, which matches what you ended up with (which is always a good sign :)).

In Firefox the fix should be a one liner (changing order [here](https://searchfox.org/mozilla-central/rev/ef0aa879e94534ffd067a3748d034540a9fc10b0/servo/components/style/properties/shorthands/border.mako.rs#113), for my own reference).

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


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

Received on Wednesday, 7 December 2022 22:18:29 UTC