Skip to content
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-merge-longhand should preserve case of CSS custom properties #648

Closed
p-a opened this issue Oct 25, 2018 · 1 comment
Closed

postcss-merge-longhand should preserve case of CSS custom properties #648

p-a opened this issue Oct 25, 2018 · 1 comment
Labels

Comments

@p-a
Copy link
Contributor

p-a commented Oct 25, 2018

CSS custom properties are unlike other properties case-sensitive

postcss-merge-longhand however lowercases all properties which f.ex. turns

.foo { border: 1px rgba(var(--camelCase),1); }

into

.foo{border:1px rgba(var(--camelcase),1)}

The culprit seems to be parseWsc.js

Rather than bluntly lowercasing any match, it should try not to do that for custom properties.
I guess an easy workaround would be to just bailout if the string includes two consecutive dashes.

@alexander-akait
Copy link
Member

@p-a oh, it is bug, feel free to send a PR

p-a pushed a commit to p-a/cssnano that referenced this issue Oct 25, 2018
p-a pushed a commit to p-a/cssnano that referenced this issue Oct 27, 2018
alexander-akait pushed a commit that referenced this issue Nov 1, 2018
* Preserve case of css custom variables. Fixes #648

* Added more tests of css custom variables case sensitivity. #648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants