IE conditional HTML comments don't play well with the rest of the document
See original GitHub issueusing the style_html function with a document that starts with:
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
the entire indentation of the document is thrown off because of the IE conditional comments at the beginning of the file …
tried using the unformatted option ['!--[if lt IE 7]', '!--[if IE 7]', '!--[if IE 8]', '!--[if gt IE 8]', '![endif]--', '!--']
but it breaks the entire styling.
Issue Analytics
- State:
- Created 12 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
IE Stylsheets/ Conditional comments Not working
So I used this conditional comment to link to the stylesheet. That doesn't work, and it will either use the default stylesheet or...
Read more >Why “Conditional Comments” Are Bad, Repeat: Bad
Conditional Comments guarantee your HTML to be changed, because they mix to-be-separated structure and presentation. No matter how you use CC, ...
Read more >Internet Explorer Conditional Comments - SitePoint
Conditional comments use a special syntax—HTML markup wrapped in a conditional statement—and are placed within an HTML comment.
Read more >Things You Might Not Know About Conditional Comments
Use of conditional comments to target certain versions of Internet Explorer is pretty commonplace nowadays, and is generally seen as the ...
Read more >Conditional stylesheets vs CSS hacks? Answer: Neither!
Also - Yahoo's internal coding best practices do not recommend ... 2010.05.20: Turns out IE conditionals around css files for IE6 can slow ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍 Your kind words and encouragement have moved me.
lol thanks! much appreciated.