Any @import rules must precede all other at-rules and style rules in a style sheet (besides @charset, which must be the first thing in the style sheet if it exists), or else the @import rule is invalid.

Noncompliant Code Example

@charset "UTF-8";

.mybox {
  color: green;
}

@import "mystyle.css"; /* Noncompliant: .mybox rule precedes the @import rule */

Compliant Solution

@charset "UTF-8";

@import "mystyle.css";

.mybox {
  color: green;
}

See