Re: [csswg-drafts] Multiple stylesheets per file (#5629)

As I said in my previous comment, I think it's a very reasonable suggestion, I just haven't spent any time speccing it out. ^_^

A few questions that probably need resolving, tho:

1. I assume that the top-level import is still the overall stylesheet containing the `@sheet` rules, yeah? We just additionally specify that the `@sheet` rules produce additional exported sheets in the module object, keyed to their name?
2. The `@sheet` contents are independent, as if they were `@import url("data:...");`, right? The example in the preceding comment would indeed work (layer names are shared across all sheets already) but it wouldn't, say, see a `@namespace` rule in the outer sheet (and presumably could contain a `@namespace` rule of its own).
3. What's the behavior of `@media (...) { @sheet {...} }`? I presume the answer needs to be "it's invalid", and `@sheet` objects are required to be top-level.
4. Can you nest `@sheet`s tho? If so, does the top-level import expose them all as a flat list, or do you just get the top-level ones, and have to go find the lower ones yourself?
5. If you have multiple `@sheet foo` rules, do we only take one and treat the rest as invalid (and then do we take first or last?)? Or do we merge their contents as if they were a single sheet?

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5629#issuecomment-1402471865 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 24 January 2023 19:23:14 UTC