Files
DeviceManager/node_modules/stylelint/lib/rules/custom-property-no-missing-var-function/README.md

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); }
```