• I noticed when minifying CSS with calc(), the spaces before and after for plus (+) and minus (-) signs are removed. This causes a problem for web browsers as unrecognisable and invalid values. However, the spaces removed for multiplication (*) and division (/) are still recognisable.

    For example,

    Non-minified:
    div { width: calc(100% + 100px); }
    div { width: calc(100% – 100px); }

    Minified:
    div { width: calc(100%+100px); }
    div { width: calc(100%-100px); }

    This problem can be easily reproduced.
    Please look into this issue, and hopefully a fix in your next release.

    Thank you very much.

Viewing 1 replies (of 1 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    While the minification option is enabled it compact the code by removing spaces in it. You can simply exclude the code from minification to solve the problem.

Viewing 1 replies (of 1 total)
  • The topic ‘Minify CSS Calc Problem’ is closed to new replies.