purifycss / gulp-purifycss

Removed unused CSS with the gulp build tool
MIT License
336 stars 21 forks source link

Doesn't apply to classes ? #13

Open raphaelgoetter opened 9 years ago

raphaelgoetter commented 9 years ago

Hello and thank you for this contrib.

I tried gulp-purifycss with some classes that where not present in my HTML page :

.kiwi {
    display: block;
}
.banane {
    display: inline;
}
p.kiwi {
    font-weight: bold;
}
p.banane {
    font-weight: normal;
}

But all these unused classes where kept in the compiled CSS :(

NerdCowboy commented 9 years ago

Having the same issue in a React app. The file size does go down marginally for me (~9k using customized bootstrap), but I added unused classes as well and they weren't stripped either.

I also turned on "rejected" to true to see what's actually being stripped, but nothing is being logged in the terminal, so I can't even attempt to debug what's going on—so that might be a separate issue or I'm just doing it wrong (I'm kind of a newb).

aseem2625 commented 8 years ago

Hi @raphaelgoetter Can you plz give you config so that I can see what's happening. May be you're using them in js file.