.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / number-leading-zero / README.md
1 # number-leading-zero
2
3 Require or disallow a leading zero for fractional numbers less than 1.
4
5 ```css
6 a { line-height: 0.5; }
7 /**              ↑
8  * This leading zero */
9 ```
10
11 The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
12
13 ## Options
14
15 `string`: `"always"|"never"`
16
17 ### `"always"`
18
19 There *must always* be a leading zero.
20
21 The following patterns are considered violations:
22
23 ```css
24 a { line-height: .5; }
25 ```
26
27 ```css
28 a { transform: translate(2px, .4px); }
29 ```
30
31 The following patterns are *not* considered violations:
32
33 ```css
34 a { line-height: 0.5; }
35 ```
36
37 ```css
38 a { transform: translate(2px, 0.4px); }
39 ```
40
41 ### `"never"`
42
43 There *must never* be a leading zero.
44
45 The following patterns are considered violations:
46
47 ```css
48 a { line-height: 0.5; }
49 ```
50
51 ```css
52 a { transform: translate(2px, 0.4px); }
53 ```
54
55 The following patterns are *not* considered violations:
56
57 ```css
58 a { line-height: .5; }
59 ```
60
61 ```css
62 a { transform: translate(2px, .4px); }
63 ```