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

Doesn't optimize custom properties #422

Closed
dizel3d opened this issue Oct 4, 2020 · 2 comments
Closed

Doesn't optimize custom properties #422

dizel3d opened this issue Oct 4, 2020 · 2 comments

Comments

@dizel3d
Copy link

dizel3d commented Oct 4, 2020

require('csso').minify(text).css

where text equals

:root {
    --color-controls-type-action-typo-base: rgba(0, 0, 0, 0.1);
    --color-controls-type-action-fill-color-base: rgb(235, 225, 224);
}

returns

:root{--color-controls-type-action-typo-base: rgba(0, 0, 0, 0.1);--color-controls-type-action-fill-color-base: rgb(235, 225, 224)}

but expected

:root{--color-controls-type-action-typo-base:rgba(0,0,0,.1);--color-controls-type-action-fill-color-base:#ebe1e0}
@dizel3d
Copy link
Author

dizel3d commented Oct 4, 2020

Workaround

require('csso').minify(text.replace(/--/g, '____')).css.replace(/____/g, '--')

@lahmatiy
Copy link
Member

Duplicate of #425
Merge in #425 since it better express what to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants