documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Unrequired conditional comments #54

Closed benschwarz closed 14 years ago

benschwarz commented 14 years ago

When using Jammit, it is generating two sets of conditional comments for my stylesheets, the first of which, should probably be removed as it serves no foreseeable purpose, other than making my document's markup look ugly.

<!--[if (!IE)|(gte IE 8)]><!--> and <!--[if lte IE 7]> blocks are rendered, by the inclusion of the latter, the former should be omitted as we've already established that the styles below are for IE7 or lower.

jashkenas commented 14 years ago

I'm a little confused -- The conditional comments are there to serve Data-URI flavors of CSS to browsers that support it (IE8+), and MHTML or vanilla flavors of CSS to IE7 and below. Can you gist a complete example of the comments that you think are wrong?

benschwarz commented 14 years ago

I'm saying that because you have a rule that states "IE7 and below" you don't need one to select "other browsers". Its redundant.

jashkenas commented 14 years ago

Nope. We don't want IE7 and below to load the Data-URI version of the stylesheets in addition to the stylesheets they're already loading.

Poor IE7 -- it's already hard enough for the little guy -- no need to hammer it with 2X the CSS. ;)

benschwarz commented 14 years ago

Oh. It looks like I mislead (myself) here. I had assumed that jammit was rendering only the datauris in that stylesheet and the rest of the styles in the main stylesheet. (Basically, overwriting the properties with datauris that didn't work)