This jade mixin lets you write conditional comments easily and keep your code readable.

What’s important here is the opportunity to set classes based on the condition. In this case we’re detecting the presence of IE 9.

The .no-js class is optional as it’s something handled by Modernizr.

mixin conditional-comment(condition)  
  | <!--[!{condition}]>
  | <![endif]-->

+conditional-comment('if lt IE 9')
  <html class="no-js ie less-than-ie9" lang="en">

+conditional-comment('if IE 9')
  <html class="no-js ie ie9" lang="en">

<!--[if (gt IE 9)|!(IE)]><!--><html class="no-js greater-than-ie9-or-not-ie" lang="en"><!--<![endif]-->

  //- head here
  //- body here

Don’t forget to close the final </html> manually. Jade never gets to open the <html> tag in this syntax and therefore cannot close it for you.