filamentgroup / grunt-criticalcss

Grunt wrapper for criticalcss
MIT License
530 stars 26 forks source link

Bootstrap 3.0 - Glyphicons causing - Unexpected end of input #20

Closed joe-watkins closed 9 years ago

joe-watkins commented 9 years ago

Hello, I was having issues getting the critical CSS outputted and started pruning the CSS file down to see if I could find the culprit. It turns out that this was it:

.glyphicon-file:before {
    content: "\e022";
}

Does that ring a bell with you? I changed the selector's name to .glyphicon-files and it worked just fine. So it appears the word 'file' in the selector freaked things out.

joe-watkins commented 9 years ago

Here's a little video screencast action: http://www.screencast.com/t/HbJfA2Leu

joe-watkins commented 9 years ago

And one more bugger causing the same issue.. totally 'file' related. This time FontAwesome:

.fa-file:before {
    content: "";
}
jefflembeck commented 9 years ago

@joe-watkins - first, just making sure - which version are you using of grunt-criticalcss?

joe-watkins commented 9 years ago

:) sorry - 0.4.5

jefflembeck commented 9 years ago

Ok, last request - :D - any chance you can get me one of these failing icons in data-uri/css format? I want to make sure I have a solid test in place.

jefflembeck commented 9 years ago

Nevermind, I think I know the error.

jefflembeck commented 9 years ago

All right, give 0.4.6 a try, that should fix it. Reopen if it doesn't. Thanks!

joe-watkins commented 9 years ago

Nailed it tnx :)

juliendude commented 9 years ago

Hi jefflembeck,

first, thanks for this great script. super useful!

I'm having the same issue with font icons "content" property. After running the task, .ion-map:before{content:'\e80a'} becomes .ion-map::before{ content: ; }

I've updated grunt, node to their latest version and grunt-criticalcss v0.5.0.

I'm using the default file provided. Is there something that I am missing?

jefflembeck commented 9 years ago

@julienbenisty

Which OS is this on?

Also, when you mention "the default file provided", which file do you mean? I'd love to get this fixed as quickly as possible. :)