Skip to content

Commit

Permalink
Fix named-grid-area-no-invalid README (#5187)
Browse files Browse the repository at this point in the history
* Fix named-grid-area-no-invalid README

* Update lib/rules/named-grid-areas-no-invalid/README.md

Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>

Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
  • Loading branch information
jeddy3 and ybiquitous committed Mar 8, 2021
1 parent 860d3b7 commit d9dddf2
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions lib/rules/named-grid-areas-no-invalid/README.md
Expand Up @@ -4,56 +4,47 @@ Disallow invalid named grid areas.

<!-- prettier-ignore -->
```css
a { grid-template-areas:
a { grid-template-areas:
"a a a"
"b b b"; }
/** ↑
* This named grid area */
```

For a named grid area to be valid, all strings must define:

- the same number of cell tokens
- at least one cell token

And all named grid areas that spans multiple grid cells must form a single filled-in rectangle.

## Options

### `true`

The following patterns are considered violations:

All strings must define the same number of cell tokens.

<!-- prettier-ignore -->
```css
a { grid-template-areas: "a a a"
"b b b b"; }
a { grid-template-areas: "" }
```

All strings must define at least one cell token.

<!-- prettier-ignore -->
```css
a { grid-template-areas: "" }
a { grid-template-areas: "a a a"
"b b b b"; }
```

All named grid areas that spans multiple grid cells must form a single filled-in rectangle.

<!-- prettier-ignore -->
```css
a { grid-template-areas: "a a a"
"b b a"; }
```

The following patterns are _not_ considered violations:
The following pattern is _not_ considered a violation:

<!-- prettier-ignore -->
```css
a { grid-template-areas: "a a a"
"b b b"; }
```

<!-- prettier-ignore -->
```css
a { grid-template-areas: "a a a" "b b b"; }
```

<!-- prettier-ignore -->
```css
a { grid-template-areas: none; }
```

0 comments on commit d9dddf2

Please sign in to comment.