Skip to content

[css-cascade] When an import rule fails to load or has an unsatisfied condition, does the layer still count? #6776

Description

@xiaochengh

Consider @import rules below:

@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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions