Re: [csswg-drafts] [css-logical][css-cascade] `revert`/`revert-layer` with logical properties (#7054)

Yes, and BTW Blink has the concept of surrogate properties, which are basically pairs of properties where one should actually be a [legacy shorthand](https://drafts.csswg.org/css-cascade-5/#legacy-shorthand) of the other (e.g. it has a `-webkit-` prefix with slightly different syntax or something), but instead of a shorthand it's implemented as an independent longhand that shares a computed value. They kinda behave like logical/physical properties in the sense that order matters, and the last one wins. For these, `revert` and `revert-layer` don't care which one was specified in the previous origin/layer. This seems reasonable to me:

```css
@layer { #target { -webkit-text-orientation: sideways } }
@layer { #target { text-orientation: revert-layer } }
```
```js
getComputedStyle(target).textOrientation; // "sideways"
```

WebKit has a similar concept of properties like that. Currently `revert` and `revert-layer` only roll back to the same exact property, but I plan to change this in https://bugs.webkit.org/show_bug.cgi?id=238125


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


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

Received on Wednesday, 30 March 2022 22:03:30 UTC