-
Notifications
You must be signed in to change notification settings - Fork 680
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] Support @import scope() syntax #11237
base: main
Are you sure you want to change the base?
Conversation
This will be needed to describe the new scope() function for the @import prelude.
Note that this PR has two commits. The first commit copies over the @import section from level 5, verbatim. |
Note that the Media Query part still needs to appear last in the grammar due to w3c#10972.
017b4d7
to
d4a3a00
Compare
[ layer | layer(<<layer-name>>) ]? | ||
<<import-conditions>> ; | ||
[[ layer | layer(<<layer-name>>) ] | ||
|| [ scope( [ (<<scope-start>>) ]? [ to (<<scope-end>>) ]? | <<scope-start>> ) ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [ scope( [ (<<scope-start>>) ]? [ to (<<scope-end>>) ]? | <<scope-start>> ) ]
+ [ scope( [ [ (<<scope-start>>) ]? [ to (<<scope-end>>) ]? ]! | <<scope-start>> ) ]
(do not allow empty alternative)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But @import scope()
is valid, though. It gives you an "implicit scope", i.e. equivalent to @scope { }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that is intentional then. Sorry! =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this then be @import scope
in parallel with @import layer
?
I'd rather not have authors needing to remember:
valid | invalid |
---|---|
@import layer |
@import layer() |
@import scope() |
@import scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romainmenke Ah, yes, that's seems better.
Is it possible to edit Cascade 4 and 5 to prevent - @import [ <url> | <string> ] ... <import-conditions> ;
- <import-conditions> = [ supports( [ <supports-condition> | <declaration> ] ) ]? <media-query-list>?
+ @import [ <url> | <string> ] ... [ supports( [ <supports-condition> | <declaration> ] ) ]? <media-query-list>? ; Is it possible to define For example,
Note:
At least, the grouping brackets no longer seem necessary around |
@cdoublev That does sound quite reasonable, but I'll wait for an editor to have an opinion on what this should look like.
Trying another editor, since @mirisuzanne is unresponsive. |
#7348