Re: [csswg-drafts] Define canonical order of longhand properties (#6894)

Thanks for the links. It's interesting to have these historical details.

So Firefox uses the order defined in the title of the definition of `background` in CSS2. I think I missed the field *canonical order: by grammar* , which I think implicitly defines the following order:

| Position | CSS3                    | CSS2                    |
| -------- | ----------------------- | ----------------------- |
|        1 | `background-color`      | `background-color`      |
|        2 | `background-image`      | `background-image`      |
|        3 | `background-position`   | `background-repeat`     |
|        4 | `background-size`       | `background-attachment` |
|        5 | `background-repeat`     | `background-position`   |
|        6 | `background-attachment` | `background-size`       |
|        7 | `background-origin`     | `background-origin`     |
|        8 | `background-clip`       | `background-clip`       |

I might not have opened this issue otherwise, sorry. But this field could also be defined explicitly to make its interpretation less ambiguous in some cases.

For example, for `border`, its grammar gives the order` border-<side>-width`, `border-<side>-style`,` border-<side>-color`, but the `<side>` order is only defined in prose of the corresponding shorthands (`border-width`, `border-style`, `border-color`).

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


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

Received on Thursday, 30 December 2021 17:03:06 UTC