-
Notifications
You must be signed in to change notification settings - Fork 483
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
Rule is empty when defining root-only CSS variables #538
Comments
+1 |
I agree. This style of variable definition is used in http://github.com/suitcss/suit, which is based on a future css spec. Maybe allow for the user to turn this off? |
+1 (two years later), also:
|
caused by CSSLint/parser-lib#120? |
Still broken. |
@Mottie @tophf Thanks for suggesting a workaround and your work on this. Can you confirm the license of your modified version? https://github.com/openstyles/stylus/tree/master/vendor-overwrites/csslint |
We didn't change the license:
|
@tophf Thanks, the repo is marked as GPL so I wanted to be 100% sure here that you're allowing others to use the modifications under the original non-GPL license. |
You could also just use a modern (and maintained) style code linter like stylelint 😉. |
Stylelint doesn't validate the css (ref). The authors are deferring the validation to csstree. That and csslint is less than 100KB in size while Stylelint (without csstree) is over 3MB in size and does not work with browserify nor rollup – which is why we ended up creating the stylelint-bundle repository which removes some of the functionality to get stylelint to bundle and work properly. |
From a security perspective, one pro of csslint is that it doesn't use eval anywhere which isn't the case for csstree last time I checked. |
@seanw From a functionality perspective, one con of csslint is that it doesn't work on modern CSS including custom properties. |
What is the solution of this? |
When using csslint with variables against the
:root
element, it throws the message of "rule is empty".This rule should not be considered empty against the
:root
element that only contains CSS variables as it is considered the de-facto way to create them globally.The text was updated successfully, but these errors were encountered: