Skip to content

[css-cascade] Relax the restriction for @import to precede all other rules #6334

Description

@LeaVerou

I've recently come across a number of cases where stylesheets were concatenated, making previously valid @import rules invalid. It was quite annoying to need to write code to hoist them manually.

Also, them having to be first means they cannot be used to import rules that should override other rules.
It also means that related code cannot be kept together, but needs to be scattered in multiple places.

Is there an implementation reason why these rules need to precede most other rules?
Would it be feasible in terms of web compat to relax this?

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