UNPKG

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