[csswg-drafts] [css-cascade-6] Can we support implicit scopes in nested settings? (#10497)

mirisuzanne has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-cascade-6] Can we support implicit scopes in nested settings? ==
We have previously resolved to supply an 'implicit' scope-root inside `<style>`. The root is the parent node of the `<style>` element:

```css
<article id="my-thing">
  <style>@scope { /* similar to `@scope (article#my-thing)` */ }</style>
</article>
```


A different implicit scope-root might be more useful when `@scope` is nested inside other selectors. In that case, I would expect the missing `(<scope-start>)` should default to `(&)`:


```css
article {
  /* un-scoped `article` declarations */

  @scope { /* same as `@scope (&)` */ }
  @scope to (.another-thing) { /* @scope (&) to (.another-thing) */ }
}
```

That isn't exactly a parallel behavior, and I'm not sure if there are edge cases where it might be unclear which is intended. But I think this would be the most useful/expected result from a nested `@scope` syntax.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10497 using your GitHub account


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

Received on Tuesday, 25 June 2024 23:17:48 UTC