Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 705 Bytes

File metadata and controls

34 lines (24 loc) · 705 Bytes

custom-property-no-outside-root

Disallow custom properties outside of :root rules. This enforces the limitation set by postcss-custom-properties:

It currently just aims to provide a future-proof way of using a limited subset (to :root selector) of the features provided by native CSS custom properties.

    a { --foo: 1px; }
/** ↑   ↑
 * These selectors and these types of custom properties */

Options

true

The following patterns are considered warnings:

a { --foo: 1px; }
:root, a { --foo: 1px; }

The following patterns are not considered warnings:

:root { --foo: 1px; }