You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At-rules are CSS statements that instruct CSS how to behave. Some at-rules have strict placement requirements that must be followed for the stylesheet to work correctly. For example:
8
+
9
+
- The `@charset` rule must be placed at the very beginning of a stylesheet, before any other rules, comments, or whitespace.
10
+
- The `@import` rule must be placed at the beginning of a stylesheet, before any other at-rules (except `@charset` and `@layer` statements) and style rules.
11
+
12
+
If these rules are placed incorrectly, browsers will ignore them, resulting in potential encoding issues or missing imported styles.
13
+
14
+
## Rule Details
15
+
16
+
This rule warns when it finds:
17
+
18
+
1. A `@charset` rule that is not the first rule in the stylesheet
19
+
2. An `@import` rule that appears after any other at-rules or style rules (except `@charset` and `@layer` statements)
You can disable this rule if your stylesheets don't use `@charset` or `@import` rules, or if you're not concerned about the impact of incorrect placement on encoding and style loading.
0 commit comments