Skip to content

Commit

Permalink
Remove IE conditional classes
Browse files Browse the repository at this point in the history
The reasons behind this decision include the following:

* This project will drop legacy browser support (see #1050), therefore,
  the use for conditional classes for IE 8+, becomes much more limited.
* IE 10+ does not support conditional comments:
  http://msdn.microsoft.com/en-us/library/ms537512%28v=VS.85%29.aspx.
* Users do and can develop easily without using the conditional
  classes, this technique being very limited in scope as no other
  browser versions are explicitly target in the same way.
* It fixes the issue that prevents IE from honouring
  `<meta http-equiv="X-UA-Compatible" content="IE=edge">` (see: #1187).

This change also removes the related documentation.

Close #1290 and #1187.
  • Loading branch information
alrra committed Sep 24, 2013
1 parent fdbff10 commit 13f17a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### HEAD

* Remove IE conditional classes ([#1290](https://github.com/h5bp/html5-boilerplate/issues/1290), [#1187](https://github.com/h5bp/html5-boilerplate/issues/1187])).

### 4.3.0 (September 10, 2013)

* Use one apple-touch-icon instead of six ([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367)).
Expand Down
21 changes: 0 additions & 21 deletions doc/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,6 @@ table of contents](TOC.md)

# The HTML

## Conditional `html` classes

A series of IE conditional comments apply the relevant IE-specific classes to
the `html` tag. This provides one method of specifying CSS fixes for specific
legacy versions of IE. While you may or may not choose to use this technique in
your project code, HTML5 Boilerplate's default CSS does not rely on it.

When using the conditional classes technique, applying classes to the `html`
element has several benefits:

* It avoids a [file blocking
issue](http://webforscher.wordpress.com/2010/05/20/ie-6-slowing-down-ie-8/)
discovered by Stoyan Stefanov and Markus Leptien.
* It avoids the need for an empty comment that also fixes the above issue.
* CMSes like WordPress and Drupal use the body class more heavily. This makes
integrating there a touch simpler.
* It still validates as HTML5.
* It uses the same element as Modernizr (and Dojo). That feels nice.
* It can improve the clarity of code in multi-developer teams.


## The `no-js` class

Allows you to more easily explicitly add custom styles when JavaScript is
Expand Down
5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down

0 comments on commit 13f17a7

Please sign in to comment.