criticalCSS icon indicating copy to clipboard operation
criticalCSS copied to clipboard

Force exclude?

Open furzeface opened this issue 9 years ago • 3 comments

Hello,

Is there currently a way to force exclude a selector?

The reason I ask is that the critical css inlined has a selector that references an image in the CSS.

This image has a relative path: ../images/sprite.svg - relative to the CSS file that is built so it pulls through correctly once the CSS file is loaded, but is the incorrect path relative to the inlined CSS in the HTML file (it would be ./images/sprite.svg to be correct in this scenario).

It is 404ing causing lots of errors in logs, as well as me being a perfectionist not wanting the error in the console etc.

Thanks! :octocat:

Dan.

furzeface avatar Jun 14 '16 14:06 furzeface

There is not right now, there most definitely should be. I'm sorry we haven't gotten to it :(

jefflembeck avatar Aug 19 '16 20:08 jefflembeck

I also required it; to take webfonts out of the criticalcss, done now using a simple grunt-replace, but i would indeed be nice when a forceExclude is supported.

Paul424 avatar Sep 04 '17 13:09 Paul424

I'm also running into a need for this. I want to make sure .carousel-inner > .item does not get added to my style sheets. It is messing up my carousel animations.

If you can guide me in the direction on how to implement this I can try to help with a patch for this. (Not really familiar with Node.js)

albertski avatar Jun 11 '18 16:06 albertski