How can I convert following IE conditional statements in JADE language :
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
I have tried following but it is not working:
//if IE 8
html lang="en" class="ie8"
//if IE 9
html lang="en" class="ie9"
//if !IE
html lang="en"
// <![endif]
It is showing following output :
<!--if IE 8html lang="en" class="ie8"
-->
<!--if IE 9html lang="en" class="ie9"
-->
<!--if !IEhtml lang="en"
-->
<!-- <![endif]-->
Can some one guide me how it can be rectified.
js, also known as PUG, is a Javascript library that was previously known as JADE. It is an easy-to-code template engine used to code HTML in a more readable fashion. One upside to PUG is that it equips developers to code reusable HTML documents by pulling data dynamically from the API.
As written in the comment documentation, you can either use // which will translate to a HTML comment or //- which won't be visible in the outputted HTML code. I have used //- test comment this comment is outputted on source view ctrl+u on browser.
Pug is a template engine for Node and for the browser. It compiles to HTML and has a simplified syntax, which can make you more productive and your code more readable. Pug makes it easy both to write reusable HTML, as well as to render data pulled from a database or API.
Support for the //if IE 8
conditional comment syntax was removed few months ago: Git Commit
Version 0.35 was the last version to support them; v1.0 is the first release after the removal.
I've been using the literal style @Jayram uses; only differences being conditional logic à la h5bp and the closing html tag:
| <!--[if IE 8]> <html lang="en" class="lt-ie9"> <![endif]-->
| <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
Note: Remember to close the document with | </html>
since the initial html tag is not Jade's self-closing syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With