- From: Roman Komarov via GitHub <sysbot+gh@w3.org>
- Date: Tue, 09 Apr 2024 20:23:35 +0000
- To: public-css-archive@w3.org
I was playing a bit with the `revert-layer` in custom properties, and I did find that there is a possibility to introduce a cyclic dependency via layers as @andruud shows. And there are for sure cases where we'd want the `--foo: var(--bar, revert-layer)` to work, I did attempt this a few times when doing experiments for [my latest article](https://kizu.dev/layered-toggles/) that utilizes cyclic dependencies. I think I like how Chrome handles this the most currently: regardless of if a property is registered, I'd want the `revert-layer` in `--foo: var(--bar, revert-layer)` to revert the `--foo`. When registering the property, it seems that in Safari we _can_ `revert-layer` a custom property, but only if it is registered with some specific syntax (not universal). In Firefox Nightly, right now, we can't `revert-layer` regardless if we register property or not. Here is a CodePen with an example: https://codepen.io/kizu/pen/MWRGoNp (I think, _ideally_ it would be nice to have some way to pass around and apply the CSS-wide keywords through custom properties, but that's probably a bigger, separate issue) -- GitHub Notification of comment by kizu Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9131#issuecomment-2045989643 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 9 April 2024 20:23:35 UTC