Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 778 Bytes

File metadata and controls

45 lines (34 loc) · 778 Bytes

custom-property-no-missing-var-function

Disallow missing var function for custom properties.

    :root { --foo: red; }
    a { color: --foo; }
/**            ↑
 *             This custom property */

This rule only reports custom properties that are defined within the same source.

Options

true

The following patterns are considered violations:

:root { --foo: red; }
a { color: --foo; }
@property --foo {}
a { color: --foo; }

The following patterns are not considered violations:

:root { --foo: red; }
a { color: var(--foo); }
@property --foo {}
a { color: var(--foo); }