named-grid-areas-no-invalid
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesscorrectnessno fixdefault: offcss/stylelint-recommended
What it does
Section titled “What it does”Reports a grid-template-areas whose rows differ in length, are empty, or hold an area that is not a rectangle.
Why it matters
Section titled “Why it matters”The browser drops the whole grid-template-areas declaration when its table is not a rectangle of named cells, and every item placed by area then falls into an automatic cell.
To fix, give every row the same number of cells and make each area a rectangle.
Example
Section titled “Example”:root { --x: 1; --y: 2 }...b { grid-template-areas: "a b" "a" }c { grid-template-areas: "a a" "b a" }d { grid-template-areas: "a b" "c d" }Configuration
Section titled “Configuration”css: lint: rules: named-grid-areas-no-invalid: warn # off (default), warn, errorless: lint: rules: named-grid-areas-no-invalid: warn # off (default), warn, errorscss: lint: rules: named-grid-areas-no-invalid: warn # off (default), warn, errorEnabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line named-grid-areas-no-invalid in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | named-grid-areas-no-invalid |
full |