UNPKG

761 BMarkdownView Raw
1# declaration-block-single-line-max-declarations
2
3Limit the number of declarations within a single-line declaration block.
4
5<!-- prettier-ignore -->
6```css
7a { color: pink; top: 0; }
8/** ↑ ↑
9 * The number of these declarations */
10```
11
12## Options
13
14`int`: Maximum number of declarations allowed.
15
16For example, with `1`:
17
18The following patterns are considered violations:
19
20<!-- prettier-ignore -->
21```css
22a { color: pink; top: 3px; }
23```
24
25<!-- prettier-ignore -->
26```css
27a,
28b { color: pink; top: 3px; }
29```
30
31The following patterns are _not_ considered violations:
32
33<!-- prettier-ignore -->
34```css
35a { color: pink; }
36```
37
38<!-- prettier-ignore -->
39```css
40a,
41b { color: pink; }
42```
43
44<!-- prettier-ignore -->
45```css
46a {
47 color: pink;
48 top: 3px;
49}
50```