Jade template does not render IE conditionals properly (Pure CSS)

424 Views Asked by At

I am implementing the Pure CSS framework.

in my html head:

<!--[if lt IE 8]>
link(rel="stylesheet", href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-old-ie-min.css")
<![endif]-->
<!--[if gt IE 8 ]><!-->
link(rel="stylesheet", href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css")
<!--<![endif]-->
<!--[if lt IE 9]><!
script(src='http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js')
<![endif]-->

The problem is that it renders properly only on IE 9+. on IE 8 it does nor seem to pull up the "grids-responsive-old-ie-min.css" file.

is my Jade properly written?

1

There are 1 best solutions below

0
On

I would just simply write it as

<!--[if lt IE 9]>
link(rel="stylesheet", href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-old-ie-min.css")<![endif]-->
<!--[if gte IE 9]>
link(rel="stylesheet", href="http://yui.yahooapis.com/pure/0.5.0/grids-responsive-min.css")
<![endif]-->

If that doesn't work for you, then I would use a mixin as mentioned in this article: http://blog.tompawlak.org/ie-conditional-comments-jade