You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://jigsaw.w3.org/css-validator/#validate_by_input would fail to validate that CSS and Gatsby/Webpack would fail when building the bundle with it. But csstree-validator does not seem to detect any issues with it 🙁
The text was updated successfully, but these errors were encountered:
Hi, @Stvad!
Custom Properties may have any value per spec. So rgba(255, 255, 255, 0.95) --text-color: #3f4758 will be a value of --page-color. So that's not a syntax error according to CSS specifications.
I think it's a little bit tricky to add such kind of validation, but looks possible. I'm worry about false positive matches in some cases, so it might be optional validation.
Gatsby/Webpack would fail when building the bundle with it
It's not ok. Per spec a custom property value should not to be parsed as a regular property and cause to a syntax error. In fact, such properties may contain "incomplete" values:
Hi, thanks for building this! I'm trying to use it to validate user-input CSS in the browser before building Gatsby site with the result.
One thing that this does not seem to detect is lack of semicolons:
Say I have the following snippet
https://jigsaw.w3.org/css-validator/#validate_by_input would fail to validate that CSS and Gatsby/Webpack would fail when building the bundle with it. But csstree-validator does not seem to detect any issues with it 🙁
The text was updated successfully, but these errors were encountered: