Marina Kolesnikova
Marina Kolesnikova

Reputation: 55

YUI minifier is stripping out whitespace from calc()

YUI is stripping out whitespace between % and px like this

height: calc(100% + 30px)

Rules don't work without them. ok/not good

How I can resolve this problem, if I need to use only this minifier?

Upvotes: 0

Views: 323

Answers (2)

vitkrv
vitkrv

Reputation: 28

You can use this workaround for this:

height: calc(100% - -30px);

Upvotes: 1

George Beier
George Beier

Reputation: 256

You could try:

height: calc(100%*1 + 30px)

The "times 1" prevents the collapse of the space. At least it does with AjaxMin.

Upvotes: 0

Related Questions