Re: [csswg-drafts] [css-logical] Clarify declarations order of `all` longhands (#7984)

I think setting physical longhands last prevents serializing `background` and `border` at step 3.4.6 of [serialize a CSS declaration block](https://drafts.csswg.org/cssom-1/#serialize-a-css-declaration-block):

  > 6. If there’s any declaration in `declaration block` in between the first and the last longhand in `current longhands` which belongs to the same logical property group, but has a different mapping logic as any of the longhands in `current longhands`, and is not in `current longhands`, continue with the steps labeled `shorthand loop`.

For example, after declaring `all: initial; color: blue;`:

  - `background-position-block` is interleaved between `background-attachment` and `background-position-x`
  - `border-inline-end-color` is interleaved between `border-image-souce` and `border-left-color`

I suggest to change the requirement to *set flow-relative longhands first, before all longhands*. Hence, non-logical and physical sub-properties are guaranteed to not be interleaved by a flow-relative property.

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


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

Received on Thursday, 13 February 2025 10:03:36 UTC