-
-
Notifications
You must be signed in to change notification settings - Fork 25
Bugfix: CSS variables should not be camel-cased #46
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
Conversation
test/objectifier.test.js
Outdated
var root = parse('@media screen { }') | ||
expect(postcssJS.objectify(root)).toEqual({ | ||
'@media screen': { } | ||
'@media screen': {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this change from the pull request? Just push a new commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok no problem fixed it!
Thanks. I will release it in the next major release with PostCSS 8.0 API changes. |
One more thing — we need to mention it in docs. Can you add a variable to some example? https://github.com/postcss/postcss-js#usage |
Sure, I added a variable to the example. |
README.md
Outdated
|
||
postcssJs.objectify(root) //=> { '@media screen': { zIndex: '1' } } | ||
postcssJs.objectify(root) //=> { | ||
// --text-color: '#DD3A0A', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JS object will have quotes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Thanks. Be ready for a few weeks before PostCSS 8.0 release. |
This PR prevents CSS variable properties from being camel-cased they are case sensitive and should not be converted.