Skip to main content

grid-recommended

gridPluginConfigs["grid-recommended"] enables the low-noise CSS Grid rules that are safe for most stylesheets.

Usageโ€‹

import { gridPluginConfigs } from "stylelint-plugin-grid";

export default gridPluginConfigs["grid-recommended"];

This config is the default starting point from Getting Started. Move to grid-all only after checking the same-file assumptions documented in Current Status.

Rules in this configโ€‹

Fix legend: ๐Ÿ”ง = autofixable ยท โ€” = report only

RuleFixDescription
no-conflicting-placementโ€”Disallow same-block CSS Grid placement declarations that write the same placement slot.
no-ineffective-container-propertiesโ€”Disallow CSS Grid container declarations in blocks whose final literal display value is not grid-capable.
no-invalid-areasโ€”Disallow malformed grid-template-areas declarations.
no-invalid-auto-repeatโ€”Disallow definitely invalid CSS Grid auto-repeat track sizes.
no-invalid-minmaxโ€”Disallow flexible fr values as the minimum argument in CSS Grid minmax() track sizes.
no-invalid-repeat-countโ€”Disallow invalid fixed repeat counts in CSS Grid track templates.
no-invalid-spanโ€”Disallow non-positive span counts in CSS Grid placement declarations.
no-mismatched-template-rowsโ€”Require grid-template-rows track count to match grid-template-areas row count.
no-reversed-placement-linesโ€”Disallow reversed or zero-width numeric CSS Grid placement line ranges.
no-unknown-areasโ€”Disallow single-name grid-area references that do not match any named area declared in the same stylesheet.
no-zero-grid-linesโ€”Disallow line 0 in CSS Grid placement declarations.
prefer-gap-properties๐Ÿ”งPrefer modern gap, row-gap, and column-gap properties over legacy grid gap aliases.
validate-area-shapesโ€”Require every named grid template area to form one contiguous rectangle.
validate-track-countsโ€”Require template row and column track counts to match grid-template-areas dimensions.