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

calc() optimization #11

Open
tomhodgins opened this issue Dec 16, 2016 · 0 comments
Open

calc() optimization #11

tomhodgins opened this issue Dec 16, 2016 · 0 comments

Comments

@tomhodgins
Copy link

div {
  background : lime ;
  width : calc(50% + (5em + 5%)) ;
  height : calc(50% + (5em + 5%)) ;
}

correct minification

div{background:lime;width:calc(55% + 5em);height:calc(55% + 5em)}
  • even without evaluating it, the formula can be consolidated further

CSSnano output

div{background:lime;width:calc(50% + (5em + 5%));height:calc(50% + (5em + 5%))}
  • the 50% and 5% can be added together
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant