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

Configure cssnano options using browserlist #657

Closed
leimonio opened this issue Nov 27, 2018 · 6 comments
Closed

Configure cssnano options using browserlist #657

leimonio opened this issue Nov 27, 2018 · 6 comments
Milestone

Comments

@leimonio
Copy link

ccsnano offers some configurable optimizations, like calc. Is there a way to use the browserlist in order to be able to configure these optimizations?

To give some more context, using webpack with optimize-css-assets-webpack-plugin for production builds results in transforming calc(100vh - 5rem - calc(10rem + 100px)) to calc(100vh - 5rem - 10rem + 100px).

This is not happening though when disabling calc optimizations on default preset

preset: [`default`, { calc: false }]
@leimonio leimonio changed the title Configure cssnano options based on browserlist Configure cssnano options using browserlist Nov 27, 2018
@alexander-akait
Copy link
Member

@leimonio browserslist not related to calc optimization, You example is valid. What is problem? Which brosers is not supported this optimization?

@leimonio
Copy link
Author

I'm trying to find out if there is a way to enable/disable calc optimization based on some configuration. To be more specific I'm trying to solve this problem gatsbyjs/gatsby#9858

Which is the best way to configure this optimization in a more dynamic way for the end user?

@alexander-akait
Copy link
Member

@leimonio hm, bug in postcss-calc
/cc @andyjansson

@andyjansson
Copy link
Contributor

@leimonio please open an issue in postcss-calc.

@alexander-akait
Copy link
Member

/cc @andyjansson can you find time on fixing problem in postcss-calc, because it is should be easy for you, thanks!

@alexander-akait alexander-akait added this to the 4.1 milestone Jan 31, 2019
@alexander-akait
Copy link
Member

Close in favor postcss/postcss-calc#67, thanks for issue, sorry for delay

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

3 participants