1 | # custom-property-no-missing-var-function
|
2 |
|
3 | Disallow missing `var` function for custom properties.
|
4 |
|
5 |
|
6 | ```css
|
7 | :root { --foo: red; }
|
8 | a { color: --foo; }
|
9 | /** ↑
|
10 | * This custom property */
|
11 | ```
|
12 |
|
13 | This rule only reports custom properties that are defined within the same source.
|
14 |
|
15 | ## Options
|
16 |
|
17 | ### `true`
|
18 |
|
19 | The following patterns are considered problems:
|
20 |
|
21 |
|
22 | ```css
|
23 | :root { --foo: red; }
|
24 | a { color: --foo; }
|
25 | ```
|
26 |
|
27 |
|
28 | ```css
|
29 | @property --foo {}
|
30 | a { color: --foo; }
|
31 | ```
|
32 |
|
33 | The following patterns are _not_ considered problems:
|
34 |
|
35 |
|
36 | ```css
|
37 | :root { --foo: red; }
|
38 | a { color: var(--foo); }
|
39 | ```
|
40 |
|
41 |
|
42 | ```css
|
43 | @property --foo {}
|
44 | a { color: var(--foo); }
|
45 | ```
|