forked from h5bp/html5-boilerplate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change our conditional comments around the HTML tag to use a single .…
…oldie class. http://mathiasbynens.be/notes/safe-css-hacks We're doing this because that quadruple conditional comment <html> tag definition looks pretty scary and especially when combined with namespace augmenting stuff like Facebook's gross xmlns:fb="http://www.facebook.com/2008/fbml" bullshit. We are trying to simplify the markup we use in H5BP and a combination of conditional classnames with IE-specific hacks would be much simpler than the markup bloat we currently have. We'll target IE6 and IE7 specifically with attribute syntax hacks. http://paulirish.com/2009/browser-specific-css-hacks/ /* CLEAN NO HACKS */ div { color: blue; } /* HACKS FOR IE */ .oldie div { color: blue; /* IE 8 and below */ *color: blue; /* IE 7 and below */ _color: blue; /* IE 6 */ } /* IE6, IE7 - star hack */ .oldie div { *color: blue; } /* IE8 - winning hack */ .oldie div { color: blue\0/; } /* must be last declaration in the selector's ruleset */ Using these attribute hacks by themselves does not change the selector specificity. If you've worked with a large, long-term codebase, you'll know managing your specificity wisely is critical. Also watch Nicole Sullivan's talks.
- Loading branch information
Showing
5 changed files
with
36 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters