cssgruntjsminifygrunt-contrib-cssmin

grunt-contrib-cssmin removes box-sizing property


My stylesheets work fine until I use grunt-contrib-cssmin to minify my stylesheets.

This part:

*, *::before, *::after {
    box-sizing: inherit;
}

is completely gone after minifying.

I've tried escaping the asterisk:

\*, \*::before, \*::after {
    box-sizing: inherit;
}

It worked in Chrome but was not showing in Firefox.

Is there any workaround or fix?

Thanks!


Solution

  • Solution:

    Added \* infront of *, *::before, *::after.

    Code:

    \*, *, *::before, *::after {
        box-sizing: inherit;
    }