Given `element.style.getPropertyValue(<shorthand property name>)`, if any of the associated longhands for this shorthand are pending substitution we should serialize an empty string, not the top-side value. https://wpt.fyi/results/css/css-variables/variable-reference-shorthands.html?label=master&label=experimental&aligned&q=variable-reference-short We fail the "target1 margin" test[1] (serializing "10px"): ``` <div id="target1" style="margin: var(--prop); margin-top: 10px"></div> var testcases = [{ element: "target1", propertyName: "margin", expectedPropertyValue: "" }, ...] ``` because this: https://github.com/WebKit/WebKit/blob/27018096404e5df088accf03481b693a8fd81eac/Source/WebCore/css/StyleProperties.cpp#L484#L485 unconditionally serializes the top shorthand value, which is normally fine except in this case where the shorthand is a custom property value. Relevant spec: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue [1]: https://github.com/WebKit/WebKit/blob/27018096404e5df088accf03481b693a8fd81eac/LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-reference-shorthands.html#L25
Created attachment 418074 [details] Patch
Nevermind, I think I want to go about this a different way. I'm going to close this out.