[Feature Request]: Re-calculate percentages `[%]` to factors [unitless] · Issue #1481 · cssnano/cssnano · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some percentage values can be re-written as unitless factors, notably in CSS transforms:
E.g. .test { transform: scale(-100%); } can be also written as .test { transform: scale(-1); }.
Describe the solution you would like
Reduce percentage values to unitless values, where possible.
Possible alternatives
Do not rewrite those percentage values, but leave this kind of minification on the table.
Additional context
The computed styles for transforms for example are matrices containing elements with unitless values anyway.
E.g. reducing 100% to 1 for example shaves off 3bytes, this depends on the value of course,
as 1.45% could be rewritten as 0.145, which does not save bytes (but – it may compress better with gzip).
Are you willing to work on this?
Yes, I would like to help
The text was updated successfully, but these errors were encountered:
What should be improved?
Some percentage values can be re-written as unitless factors, notably in CSS transforms:
E.g.
.test { transform: scale(-100%); }
can be also written as.test { transform: scale(-1); }
.Describe the solution you would like
Reduce percentage values to unitless values, where possible.
Possible alternatives
Do not rewrite those percentage values, but leave this kind of minification on the table.
Additional context
The computed styles for
transform
s for example are matrices containing elements with unitless values anyway.E.g. reducing
100%
to1
for example shaves off3
bytes
, this depends on the value of course,as
1.45%
could be rewritten as0.145
, which does not save bytes (but – it may compress better with gzip).Are you willing to work on this?
The text was updated successfully, but these errors were encountered: