Skip to content

[cssom] Serialization of logical property sub-group #7935

@cdoublev

Description

@cdoublev

In serialize a CSS declaration block:

  1. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions