[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-cascade-6] Add implicit scopes #8463

Merged
merged 3 commits into from
Feb 17, 2023
Merged

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.

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.

css-cascade-6/Overview.bs Outdated Show resolved Hide resolved
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