[csswg-drafts] [css-cascade] When an import rule fails to load or isn't enabled, does the layer still count? (#6776)

xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-cascade] When an import rule fails to load or isn't enabled, does the layer still count? ==
Consider `@import` rules below:

```css
@import url(url-not-found.css) layer(A);
@import url(sheet.css) layer(B) not all;
@import url(sheet.css) layer(C) supports(display: invalid-value);
```

While these are valid but ineffective imports, do the layer declarations still count (and hence affect the global layer ordering)? The current spec seems unclear about it.

I suppose for conditional imports whose conditions evaluate to false, the layer declarations should not count, because nested `@layer` rules inside false media/supports rules do not count.

I'm unsure about imports that fail to load, though. We may count the layer for a stable global layer ordering, or do not counter the layer to be consistent with media/supports conditions. Either as a resolution will be fine for me.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6776 using your GitHub account


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

Received on Thursday, 28 October 2021 22:31:00 UTC