- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Tue, 18 Jun 2024 09:29:18 +0000
- To: public-css-archive@w3.org
> 1. We should try to solve this problem for CSS naming generally. It's come up for `@font-face` and other features before and I don't think we have a general solution. Designing solutions for each feature independently seems quite bad. I hope @tabatkins and @fantasai can help out here. [Agreed](https://github.com/w3c/csswg-drafts/issues/10145#issuecomment-2174045257). I had already given Tab an internal ping about this :) > 2. Exposing names by default very much goes against encapsulation and is not acceptable. Exposing names always needs to be opt-in. Agreed. The default should be that all names are contained. > 3. Opting into exposing names globally also seems fraught. That would violate the encapsulation of the encompassing shadow tree. It re-exposing names exposed to it seems reasonable, but that would only go one level up again. With `contain: names` _(or maybe better `contain-names: …` to not overwrite existing `contain` declarations on those elements)_ you would be able to tweak this on a per-component basis, so it would only bubble up from one shadow boundary to the other. I think the needs are to: - Contain all names (default) - Contain no names - Contain only a selected set of names With this authors can also easily opt-in to allowing names to bubble up to the root (i.e. global) in just one go by having a rule that reads `:host { /* <declaration-here-that-indicates-to-contain-no-names> */ }` – this for situations where they are in full control of all custom elements they use. This `contain-names` property should be limited to apply to only shadow hosts, because I don’t think we’d want authors to sprinkle this around on just any arbitrary element in the tree. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10145#issuecomment-2175638968 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 18 June 2024 09:29:19 UTC