no-invalid-position-at-import-rule
Disallow invalid position @import
rules.
a {}
@import 'foo.css';
/** ↑
* This @import */
Any @import
rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset
and @layer
), or else the @import
rule is invalid.
Options
true
The following patterns are considered problems:
a {}
@import 'foo.css';
@media print {}
@import 'foo.css';
The following patterns are not considered problems:
@import 'foo.css';
a {}