purifycss-webpack icon indicating copy to clipboard operation
purifycss-webpack copied to clipboard

Removing used css

Open chopfitzroy opened this issue 7 years ago • 8 comments

So I have the following css:

body {
  display: -ms-flexbox;
  display: flex;
  background-color: deeppink; }
  body div {
    background-color: deepskyblue; }

p {
  background-color: lime; }

Which after purifying is looking like this:

body {
  display: -ms-flexbox;
  display: flex;
  background-color: deeppink;
}

p {
  background-color: lime;
}

I am running with webpack 2 with the following options:

new Purify({
        basePath: __dirname,
        paths: ['index.html']
})

chopfitzroy avatar Jan 09 '17 07:01 chopfitzroy

Can you set up a standalone project? I can't reproduce this.

bebraw avatar Jan 09 '17 17:01 bebraw

Hey @bebraw yep will do as soon as I am off work.

chopfitzroy avatar Jan 09 '17 19:01 chopfitzroy

Hey @bebraw sorry have had a hectic last few days but planning to get onto this over the weekend.

Cheers.

chopfitzroy avatar Jan 12 '17 20:01 chopfitzroy

I'm having a similar issue where all my css(using bootstrap 3 and inline styles for react) are getting wiped. Purify says 40.6% of my css has been reduced, so theres still css, but the ones I use get tossed out.

These are my plugins screen shot 2017-01-14 at 2 02 48 pm

My file structure screen shot 2017-01-14 at 2 03 16 pm

Best Regards, Chris

Chrischuck avatar Jan 14 '17 22:01 Chrischuck

@Chrischuck It's important to point your app source to Purify assuming you have something class related going on there. So it may be a matter of tweaking paths.

Note that I have a new version of the plugin coming up once either npm or @IngwiePhoenix grants me the rights to publish one.

bebraw avatar Jan 15 '17 10:01 bebraw

There's a new version now. Please give that a go.

bebraw avatar Jan 23 '17 10:01 bebraw

Sorry for the late reply, I've been busy lately. I will give it a go when I get the chance!

Chrischuck avatar Jan 27 '17 21:01 Chrischuck

Hey @bebraw perfect fixed my issues :) sorry it took sooo long to get back to you have been slammed, will leave open until @Chrischuck can confirm.

chopfitzroy avatar Jan 28 '17 00:01 chopfitzroy