Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom-property-no-outside-root #318

Closed
Paul-Hebert opened this issue Nov 15, 2022 · 0 comments
Closed

Remove custom-property-no-outside-root #318

Paul-Hebert opened this issue Nov 15, 2022 · 0 comments

Comments

@Paul-Hebert
Copy link
Member

This rule requires that custom properties only be set on the :root element which severely limits how they can be used.

It requires this in order to make the old PostCSS polyfill for custom properties work. That treats custom properties as immutable variables (like SCSS vars) which limits their power. From the docs:

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.

We should be able to use the full set of features provided by CSS custom properties. The polyfill behavior was for IE11 (which didn't support custom props.) On most new projects we no longer support IE11 so we should ditch this rule.

https://github.com/suitcss/stylelint-suitcss/blob/master/rules/custom-property-no-outside-root/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant