-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Empty variables being flagged as errors #36508
Comments
I think it is better to have a default value for variables |
Empty custom properties is perfectly valid, and even used in a few techniques like the space toggle. It's probably a bug in your IDE or underlying linter. Please check on their side. |
I am getting an issue with this with webpack.
In version 5.1.3 there were no empty variables. Now, in version 5.2.0 there are. That change breaks things and so we will have to downgrade back to version 5.1.3. Even if empty css variables are "technically ok"- many interpreters don't think so. |
@JoshMayberry we're going to try to remove them to decrease the file size (see discussion in #36595). But that's clearly not because it's not valid. We might still want to use some empty CSS vars in some rare cases empty CSS vars. |
|
This is the error on jetbrains https://youtrack.jetbrains.com/issue/WEB-20700/CSS-Custom-Properties-Whitespace-is-marked-as-incorrect-value |
w3 validator at https://validator.w3.org also flags these empty css classes as errors. |
I am also encountering this error with |
This has just been fixed: w3c/css-validator@9a54c0d |
JetBrains IDE's (such as phpstorm) are flagging the empty variable declarations in the new version as errors.
Ex:
--bs-btn-font-family: ;
--bs-heading-color: ;
There are a couple dozen I believe.
Is this intended behavior? Or are these variables to be defined by default in future versions?
This is not my area of expertise, but I would hope there is a simple solution for this behavior as the errors are somewhat unsightly and this is one of the higher end IDE's.
The text was updated successfully, but these errors were encountered: