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
PostCSS can't parse CSS variable values #1255
Comments
Your examples contain |
@ai yes, it is valid for css variables |
It doesn't used in |
|
hm, chrome and firefox parse their and output as value of variable |
@ai does it contain unmatched
And @evilebottnawi with the Houdini APIs coming, CSS variables can be used to pass values from CSS to JS, the syntax for CSS variables being so permissive was intentional. Here's an example of that: https://houdini.glitch.me/paint |
Got it. OK I will fix it in next month. |
I created a task on Evil Martians’s open source task list for junior developers https://cultofmartians.com/tasks/postcss-vars-parse.html |
@ai @tomhodgins hey! I have started to work on that. I am new to PostCSS source code, so it could take a while. I will give an update in a week or so. |
@stas-dolgachov great! Don’t worry to ask questions. You can write to me to |
I've made a little tool here that if you enter CSS into the editor on the left or top of the page, the browser will try to parse the CSS and the result is visible on the right or bottom of the page. This is to be able to instantly test how each browser 'sees' some CSS code. For troubleshooting CSS variables I haven't noticed any cross-browser differences in parsing (I believe they all do it according to the standard) so hopefully this will help you test valid values faster as you troubleshoot! |
Fixed in #1259 |
The fix was released in 7.0.15. |
7.0.15 was reverted in 7.0.16. Custom Properties fix will be released only in 8.0 until |
It appears PostCSS has difficulty parsing CSS variables according to CSS's syntax, examples include:
You can find more known-valid examples of CSS variables in my css-tests repository, or in the Web Platform Tests repository, and you can read about the syntax for CSS variable values in the CSS Variables spec
The text was updated successfully, but these errors were encountered: