Re: [csswg-drafts] [css-scoping] * should also select shadow roots, a non-element node (#8184)

It seems to me you should just use

```css
:root { --box-sizing: border-box; }
*, *:before, *:after { box-sizing: var(--box-sizing); }
```

And then change `--box-sizing` when you want to affect the subtree. You are in control of `--box-sizing`, so it won't happen unexpectedly.
You say `box-sizing: inherit` is a standard way but TBH it's the 1st time that I have seen it and I don't think it's the right solution. It's not just shadow DOM, you also risk that important UA rules or adjuster changes at computed-value time will unexpectedly affect whole subtrees.



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


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

Received on Monday, 5 December 2022 17:52:42 UTC