Re: [csswg-drafts] An extra keyword to disable inheritance? (#9531)

It's also not clear what kinds of inheritance this would avoid, e.g.

```html
<style>
div { color: cyan no-inherit }
</style>
<div>
  <p>foo</p>
  bar
</div>
```

Presumably the intention would be for `color: cyan` to only affect "bar" but not "foo"?

However, "bar" has a style of its own, that inherits from its parent element. There is also an anonymous block. So I guess `no-inherit` should still allow text nodes and anonymous boxes to inherit?

And what about pseudo-elements? Presumably you want `::first-line` to still inherit the text. What about `::before` and `::after`? Etc.

Just unsetting with an universal selector and desired pseudo-elements seems more straightforward and clear to me.

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


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

Received on Friday, 27 October 2023 10:54:00 UTC