filamentgroup / grunt-criticalcss

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

Force include selector with camelCase #27

Closed saunders1989 closed 1 year ago

saunders1989 commented 9 years ago

Hi,

I found an issue when you have a selector like #pbOverlay which is being used by a plugin (I dont agree with the naming convention) that if you try and forceInclude this selector it doesn't include it in the generated css

is there a work around other than changing my css selector / adding these selectors in manually?

jefflembeck commented 9 years ago

@saunders1989 in the output, is #pboverlay in there?

saunders1989 commented 9 years ago

@jefflembeck its not in the output CSS file but is in the source CSS file I pass in

jefflembeck commented 9 years ago

@saunders1989 so, no version of it shows up in the output css at all?

saunders1989 commented 9 years ago

@jefflembeck unfortunately not.

jefflembeck commented 9 years ago

@saunders1989 any chance you can make a small test case and put it up somewhere? it'd really help me fix it.

saunders1989 commented 9 years ago

@jefflembeck sure I will do that tomorrow for you.

jefflembeck commented 9 years ago

@saunders1989 awesome, thank you!

saunders1989 commented 9 years ago

@jefflembeck Hi,

I have created a test case on my github - https://github.com/saunders1989/camelcase-test

When i did the test case the camel case selector did get added to the critical css file that is generated but it the selector is now all lowercase

jefflembeck commented 9 years ago

@saunders1989 ah, this is what I expected :(

This is a known issue, but we're trying to figure out a solution (it has to do with html not being case sensitive)

saunders1989 commented 9 years ago

@jefflembeck ahh okay. sorry for creating a duplicate issue. I will have to debug my more complicated grunt file / css and find out why it doesnt get included even all lowercase