mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 00:43:04 +00:00
48 lines
894 B
Markdown
48 lines
894 B
Markdown
# custom-property-no-missing-var-function
|
|
|
|
Disallow missing `var` function for custom properties.
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
:root { --foo: red; }
|
|
a { color: --foo; }
|
|
/** ↑
|
|
* This custom property */
|
|
```
|
|
|
|
This rule only reports custom properties that are defined within the same source.
|
|
|
|
The [`message` secondary option](../../../docs/user-guide/configure.md#message) can accept the arguments of this rule.
|
|
|
|
## Options
|
|
|
|
### `true`
|
|
|
|
The following patterns are considered problems:
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
:root { --foo: red; }
|
|
a { color: --foo; }
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
@property --foo {}
|
|
a { color: --foo; }
|
|
```
|
|
|
|
The following patterns are _not_ considered problems:
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
:root { --foo: red; }
|
|
a { color: var(--foo); }
|
|
```
|
|
|
|
<!-- prettier-ignore -->
|
|
```css
|
|
@property --foo {}
|
|
a { color: var(--foo); }
|
|
```
|