Re: [csswg-drafts] [cssom][css-grid] Do shorthands serialize with the resolved value of their longhands? (#11382)

The CSS Working Group just discussed `[cssom][css-grid] Do shorthands serialize with the resolved value of their longhands?`, and agreed to the following:

* `RESOLVED: Shorthands serialize using the resolved value of the individual longhands`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> oriol: Some longhands have special getComputedStyle behavior, so you get the resolved rather than computed value<br>
&lt;emilio> ... it's not clear what happens when you're serializing a shorthand that involves these<br>
&lt;emilio> ... in the issue I have various examples<br>
&lt;emilio> ... e.g. margin: auto and you serialize margin-top you might get zero, but if you try to serialize the margin longhand itself you get auto in firefox but 0 in blink/webkit<br>
&lt;emilio> ... it's particularly weird in grid properties<br>
&lt;emilio> ... because the implicit tracks and repeat() expansion<br>
&lt;emilio> q+<br>
&lt;emilio> ... we have cases where all browsers are different<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> ... I think I prefer what webkit does<br>
&lt;emilio> ... which is you serialize the shorthand as if the computed value of each longhand was set to each special resolved value<br>
&lt;fantasai> scribe+<br>
&lt;emilio> ... I think that's the most consistent<br>
&lt;fantasai> emilio: I agree.<br>
&lt;fantasai> emilio: FWIW, I consider the Firefox behavior to be a bug. Haven't gotten around to fixing, because the getters are in C++ and ...<br>
&lt;fantasai> emilio: What WebKit is doing, resolving each individual longhand, and then serializing shorthand with that is the right thing to do.<br>
&lt;fantasai> emilio: This is what Firefox does for all things that don't involve layout<br>
&lt;emilio> astearns: web compat concerns or other opinions?<br>
&lt;emilio> oriol: If webkit isn't having compat issues this is probably fine?<br>
&lt;TabAtkins> +1, I *suspect* this is reasonably safe<br>
&lt;TabAtkins> and we can always add exceptions as necessary<br>
&lt;fantasai> +1 TabAtkins<br>
&lt;emilio> PROPOSED: Shorthands serialize using the resolved value of the individual longhands<br>
&lt;emilio> RESOLVED: Shorthands serialize using the resolved value of the individual longhands<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11382#issuecomment-2880835201 using your GitHub account


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

Received on Wednesday, 14 May 2025 16:22:52 UTC