Skip to content
Browse files

Remove IE conditional classes

The reasons behind this decision include the following:

* This project will drop legacy browser support (see h5bp#1050), therefore,
  the use for conditional classes for IE 8+, becomes much more limited.
* IE 10+ does not support conditional comments:
* 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: h5bp#1187).

This change also removes the related documentation.

Close h5bp#1290 and h5bp#1187.
  • Loading branch information...
alrra authored and kcmckell committed Sep 24, 2013
1 parent e66ed49 commit 6c08acd549efd3c166af5369adedf296b22c9c4d
Showing with 3 additions and 25 deletions.
  1. +2 −0
  2. +0 −21 doc/
  3. +1 −4 index.html
@@ -1,5 +1,7 @@
### HEAD

* Remove IE conditional classes ([#1290](, [#1187](])).

### 4.3.0 (September 10, 2013)

* Use one apple-touch-icon instead of six ([#1367](
@@ -3,27 +3,6 @@ table of contents](

# 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
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
@@ -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">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

0 comments on commit 6c08acd

Please sign in to comment.
You can’t perform that action at this time.