filamentgroup / criticalCSS

Finds the Above the Fold CSS for your page, and outputs it into a file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Force exclude?

furzeface opened this issue · 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.

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

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.

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)