-
Notifications
You must be signed in to change notification settings - Fork 706
[css-cascade-7] @sheet - allow nested @sheet statements? #11999
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
Comments
I think this should be supported. Imported stylesheets can themselves contain |
This makes sense to me, I'm in favor of the syntax as proposed. But I expect most of the complexity comes in answering all the questions about import. |
The CSS Working Group just discussed
The full IRC log of that discussion<emeyer> kurt: For @sheet, should we allow sheets to be nested? It would be similar to @layer<emeyer> …They should also be delimited with a period, like with layers <emeyer> …My proposal is that we allow this for consistency <TabAtkins> q+ <astearns> ack TabAtkins <emeyer> TabAtkins: This sounds reasonable; what’s the complexity about @import? <emeyer> kurt: The behavior of @import in @sheet isn’t well defined yet <emeyer> TabAtkins: Do you foresee any extra complexity? <emeyer> kurt: I don’t <emeyer> astearns: It makes sense to me to follow the layers model <bramus> +1 <emeyer> astearns: Proposed resolution is to allow nested @sheet statements and follow the nested layer syntax <emeyer> RESOLVED: Allow nested @sheet statements and follow the nested layer syntax |
This was discussed a bit in April 2023 but didn't land on a specific resolution for this behavior: #5629 (comment)
If you have a file named my_css.css as follows:
Should this be allowed? If so, it could follow the precedent for
@layer
and allow nested sheets via the.
syntax:<link rel="my_css.css" sheet="foo.bar" />
As mentioned in the above CSSWG discussion, we'd need to be explicit about how
@import
works in these cases (which would need some careful considerations), but before we get to that, we should resolve to support nested@sheet
blocks at all.The text was updated successfully, but these errors were encountered: