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

> the meaning of "inherit" should be tweaked

Precisely, this would amend [3.3.2 inheritance](https://www.w3.org/TR/css-scoping-1/#inheritance) to say that

- when CSS from the host tree is applied to elements in the flattened shadow tree,
  - any elements of the flattened shadow tree, that were originally taken from the host tree (these are not necessarily top-level elements of the shadow tree)
  - these elements should inherit CSS from their parent node in the original host tree, rather than their current parent in the shadow tree.

The overall justification being that the current behaviour of

details > summary { box-sizing: inherit; }

is absurd - `summary` gets selected as a direct child of `details`, but then inherits from a different parent element in the shadow tree. I guess in implementations, the `<details>` node still keeps child-links to the `<summary>` node, and that is how it gets selected by ">", but when walking back up the tree for "inherit" the `<summary>` node's parent now points to the `<slot>` in the shadow tree.

-- 
GitHub Notification of comment by infinity0
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8184#issuecomment-1336600169 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 01:28:24 UTC