[csswg-drafts] [cssom] Serialization of logical property sub-group (#7935)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] Serialization of logical property sub-group ==
In [*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`.

In a nutshell: skip the shorthand if some logically *related* property it does not map to has a declaration that is in between the declarations it maps to.

But this step prevents serializing `border-color: green; border-block-start-width: 1px; border-top-color: green;` to `border-color: green; border-top-width: 1px;` because: 

  - the declaration for `border-block-start-width` is in between the declarations for `border-color` and all declarations are in the same logical property group, that I would call `border`
  - `border-block-start-width` has a different mapping logic than the declarations for `border-color`

But `border-block-start-width` is not in the logical property group that I would call `border-color`.

Maybe *containing all property names of the declarations in `current longhands`* could be appended after *the same logical property group* in the above step?

**Aside 1:** I think that *logical property group* is a confusing name because it implies that all properties of a group are logical; *logically mapped property group* seems more accurate (but more verbose, though).

**Aside 2:** it would be usefull to have an HTML attribute in the property definition table, that `w3c/reffy` could read to associate the property to the corresponding logical(ly mapped) property group(s).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7935 using your GitHub account


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

Received on Friday, 21 October 2022 13:51:20 UTC