minify css and calc function broken
-
Hi there,
i can somehow reproduce the others problems with css calc().
My experience to share, maybe this helps debugging:
.form-select-hint::before{ left:calc(50% + 1.5em); } .form-select-hint::after{ right:calc(50% + 1.5em); }
leads to
.form-select-hint::before{left:calc(50%+1.5em)}.form-select-hint::after{right:calc(50% + 1.5em)}
the first calc() gets wrong.form-select-hint::before { left:calc(50% + 1.5em) } .form-select-hint::after { right:calc(50% + 1.5em) }
has the same result
switching the rules position does the same switch.
current workaround making a newline:
.form-select-hint::before{left:calc(50% + 1.5em)} /*! * this comment prevents the minify compressor to destroy the first calc() */ .form-select-hint::after{right:calc(50% + 1.5em)}
i counted 41 calc() method calls in my CSS and that was the only one which got corrupted. So maybe its because its the first occurance in the file or because two following selectors has it.
used compressor: minify (default)
btw:
selecting CSS Tidy does not have this issue but generates a php message inside the minified CSS:<b>Deprecated</b>: The each() function is deprecated. This message will be suppressed on further calls in <b>/wp-content/plugins/w3-total-cache/lib/CSSTidy/class.csstidy.php</b> on line <b>1122</b>
selecting YUI Compressor (PHP) leads to an empty minified CSS file.
Br,
tom
- The topic ‘minify css and calc function broken’ is closed to new replies.