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

Interaction of "constructed flag" and @import rules doesn't quite make sense to me #83

Closed
bzbarsky opened this issue Dec 20, 2018 · 5 comments

Comments

@bzbarsky
Copy link

https://wicg.github.io/construct-stylesheets/#dom-cssstylesheet-insertrule disallows adding an @import rule if "constructing flag" is set. Why is this restriction present?

In particular, why do we allow adding an @import rule to a sheet imported from a sheet with the "constructed flag" but not to the parent sheet itself?

@rakina
Copy link
Member

rakina commented Dec 20, 2018

I think you made an issue on this: #56, and it was also discussed in #57 (comment) that we don't want to allow insertion of @import rules?

@bzbarsky
Copy link
Author

#56 said "or any of their imports". That's not what the current spec says, though: it disallows @import insertion into the constructed sheet, but allows it into its imports. So the changes that were made didn't really address #56 as filed.

@rakina
Copy link
Member

rakina commented Dec 20, 2018

Ohh, I understand now. Can we maybe say something like "If this sheet's parent chain contains at least one sheet whose constructed flag is set, throw exception"?

@bzbarsky
Copy link
Author

That seems fairly reasonable at first glance.

@rakina
Copy link
Member

rakina commented Dec 21, 2018

Resolved with #88

@rakina rakina closed this as completed Dec 21, 2018
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

No branches or pull requests

2 participants