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 */
The following patterns are considered warnings:
a { --foo: 1px; }
:root, a { --foo: 1px; }
The following patterns are not considered warnings:
:root { --foo: 1px; }