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