Re: [csswg-drafts] [css-flexbox][css-grid] Providing authors with a method of opting into following the visual order, rather than logical order (#7387)

I think I was wrong saying that it does not matter which sub-property `-webkit-order` should be an alias: imo, it should be an alias of `layout-order` because `order` changes the layout (visual) order but not the reading (focus) order, if I am not mistaken.

  > In non-supporting browsers element’s order would be -1, in the supporting ones 1.

I was thinking about this:

```js
el.style.layoutOrder = 2
el.style.order; // ''
el.style.webkitOrder; // ?
```

A shorthand must serialize to empty string when it cannot represent all its longhands ([CSSOM](https://drafts.csswg.org/cssom-1/#serializing-css-values)), so `order` must serialize to empty string. Legacy name aliases (like `-webkit-order`) requires to replace the legacy name with the new property name ([Cascade](https://drafts.csswg.org/css-cascade-5/#legacy-name-alias)). So `-webkit-order` must also serialize to empty string if it is an alias of `order`.

In your example, `-webkit-order: -1` would be "replaced" as `order: 1` so `-webkit-order` cannot be `-1`.

Now I see no reason why someone would want to reflect `layout-order` on `-webkit-order`. The bidirectional mirroring is just a "happy" accident resulting from the legacy aliasing mechanism.

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


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

Received on Friday, 13 January 2023 04:48:13 UTC