Re: [csswg-drafts] [css-cascade-6] Should the scope proximity calculation be impacted by nesting scopes? (#10795)

> Could adding a count of nested `@scope` work as an approximation that does not require dynamic sizing?

That also seems good to me.

----

> I actually wonder if scope proximity is all that useful to begin with..

> Otherwise, we could actually consider removing proximity entirely (as `@emilio` is hinting at). I kind of regret not making `@scope` just about scoping.

Proximity is actually the CSS feature we are most excited about.

It is very common for us to have components and layouts with areas that can contain other components. With both potentially having content from a wysiwyg editor. Many CMS's are moving towards very flexible page builders where content editors can nest components in various ways.

The only way to style these as designers would expect them to appear is by using `@scope` and if `@scope` has proximity.

An abstracted example of what we often encounter:
- without using `@scope`: https://codepen.io/romainmenke/pen/ExqWBqE
- vs with `@scope`: https://codepen.io/romainmenke/pen/RwXpzXm

(I bet that component authors encounter similar issues but at a more granular/smaller level?)

I really hope that we don't lose proximity.


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


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

Received on Tuesday, 15 October 2024 17:07:04 UTC