Skip to content

Conversation

@andruud
Copy link
Member

@andruud andruud commented Feb 17, 2023

Resolves #6606 #7349

@andruud
Copy link
Member Author

andruud commented Feb 17, 2023

@mirisuzanne Please have a look.

I felt that I had to reorganize a bit here to make a natural place for "implicit" scopes to live.

Description of changes:

  • A scope should probably have a single scoping root. However:
  • A single @scope rule can produce multiple (explicit) scopes. Or a single implicit scope.
  • Removed the circular or near-circular sentence "selectors are scoped to the given scope, with the :scope element being the scoping root" which Emilio complained about at some point (somewhere).
  • Avoid selector-4's definition of "scoped" for now, because it does not clarify what it means by "descendant", and does not account for scoping limits.
  • Beautify the grammar part of the spec.

Hopefully it's more or less to your liking.

@andruud andruud requested a review from mirisuzanne February 17, 2023 00:46
Copy link
Contributor

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andruud I think it's a big improvement, thanks. I suggested a change to the syntax production, allowing lower boundaries when the root is implicit. Otherwise, it looks good to me.

using the [=scoping root=] as the '':scope'' element, then
* Set those elements as the [=scoping limits=].

[=Pseudo-elements=] cannot be [=scoping roots=] or [=scoping limits=];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After moving this above in the previous PR, I moved it back down! 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

@mirisuzanne mirisuzanne merged commit 086f663 into w3c:main Feb 17, 2023
@andruud
Copy link
Member Author

andruud commented Feb 17, 2023

@andruud I think it's a big improvement, thanks. I suggested a change to the syntax production, allowing lower boundaries when the root is implicit.

Ah, right, that didn't occur to me. But then we need another fixup: PR: #8466

@andruud andruud deleted the issue_6606 branch February 17, 2023 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[css-cascade-6] A way for <style> elements to scope to their parent element

2 participants