etodanik / ie8linter

A little tool to lint websites for IE8 compatibility, with warnings for possible pitfalls
http://ie8.caffeine.co.il/
MIT License
727 stars 20 forks source link

Conditional Comments are ignored #15

Open rvock opened 9 years ago

rvock commented 9 years ago

I have a seperate stylesheet for IE8, which I load using Conditional Comments:

<!--[if gt IE 8]><!--><link rel="stylesheet" href="static/page.css"><!--<![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" href="static/page-ie.css"><![endif]-->

IE8 Linter checks page.css instead of page-ie.css

etodanik commented 9 years ago

The problem is that both need to be technically checked.

However, I'm considering a solution where I could be "smart" about checking for overrides. There are various problems and challenges.

Until that solution is available I'm taking the approach of "let's warn about everything just in case".

rvock commented 9 years ago

Sorry, my first comment was not formated correctly. You could not see the conditional comments correctly. I've updated my post.

Now you can see, that I have two conditional comments. The first is only visible for IE > 8 and the second is only visible for IE <= 8. This prevents IE8 from loading the first stylesheet. So you do not need to check the first stylesheet.

etodanik commented 9 years ago

I see, yes - that's possible to support. I'll look into it.