css / csso

CSS minifier with structural optimizations
https://css.github.io/csso/csso.html
MIT License
3.76k stars 188 forks source link

Evaluate calc expressions #376

Open vithar opened 6 years ago

vithar commented 6 years ago

Evaluate calc expressions for smaller output:

.foo { width: calc((100px + (20px - 0)) + 10px) } to .foo { width: 130px }

.foo { width: calc((100% + (20px - 0)) + 10px) } to .foo { width: calc(100% + 30px) }

kizu commented 6 years ago

Just a note: this kind of evaluation inside the calc() could be ok, however, going calc(130px)130px can be dangerous as there is different browser support for those values.

tadatuta commented 5 years ago

hello! is there any possibility to have this issue resolved in reasonable time?

lahmatiy commented 5 years ago

I have no plans to work on this feature in near future. So only if somebody else will take it in work...