Run this code: ```js document.body.style.cssText = "--m:10px; margin:var(--m)"; document.body.style.margin; ``` **Actual**: "" **Expected: "var(--m)" See https://drafts.csswg.org/css-variables/#variables-in-shorthands > while [CSSOM] defines that shorthand properties are serialized > by appropriately concatenating the values of their corresponding longhands, > shorthands that are specified with explicit var() functions > must serialize to the original, var()-containing value.
<rdar://problem/77623544>
Safari seems to pass all test from WPT about CSS Var Serialize: https://wpt.fyi/results/css/css-variables/vars-border-shorthand-serialize.html?label=master&label=experimental&aligned&q=shorthand Anything else needed here? Thanks!
The problem here was when serializing a shorthand set to a variable. That test is unrelated, it checks the serialization of subshorthands. But anyways this was fixed in bug 230389. *** This bug has been marked as a duplicate of bug 230389 ***