Skip to main content

css/noInvalidGridTemplateAreas

Checks that grid-template-areas have valid names. In the specifics, area templates needs to have the same amount of cell tokens.

stylelint Equivalent: named-grid-areas-no-invalid

Examples

Invalid

a { grid-template-areas: "a a a"
												 "b b"; }

 filename.css:2:13 lint/css/noInvalidGridTemplateAreas ━━━━━━━━━━━━━━━━━━━━

  All strings must have the same number of cell tokens

    1a { grid-template-areas: "a a a"
  > 2                         "b b"; }
                              ^^^^^


a { grid-template-areas: "a" "b b"; }

 filename.css:1:29 lint/css/noInvalidGridTemplateAreas ━━━━━━━━━━━━━━━━━━━━

  All strings must have the same number of cell tokens

    a { grid-template-areas: "a" "b b"; }
                                 ^^^^^

Valid

a { grid-template-areas: "a a a"
												 "b b b"; }
a { grid-template-areas: none; }