| 1 |
// $Id$
|
| 2 |
|
| 3 |
ABOUT CONDITIONAL STYLESHEETS
|
| 4 |
-----------------------------
|
| 5 |
|
| 6 |
Internet Explorer implements a proprietary technology called Conditional
|
| 7 |
Comments. While web developers frown upon technologies that aren't cross-browser
|
| 8 |
supported, many CSS developers have found Conditional Comments very useful since
|
| 9 |
they can be used to fix the broken rendering of CSS in IE by placing IE-only CSS
|
| 10 |
inside conditional comments.
|
| 11 |
|
| 12 |
This module allows themes to easily add conditional stylesheets to the theme's
|
| 13 |
.info file.
|
| 14 |
|
| 15 |
|
| 16 |
THEME USERS
|
| 17 |
-----------
|
| 18 |
|
| 19 |
You only need to enable this module if a theme requires that you use it. Once it
|
| 20 |
is enabled, the module automatically performs all of its work for any theme
|
| 21 |
requiring it. You don't need to configure anything.
|
| 22 |
|
| 23 |
|
| 24 |
THEME DEVELOPERS
|
| 25 |
----------------
|
| 26 |
|
| 27 |
Before this module was available the only way to have IE conditional stylesheets
|
| 28 |
was to hard-code them into your page.tpl.php. This module allows you to add
|
| 29 |
"conditional-stylesheets" lines to your theme's .info file.
|
| 30 |
|
| 31 |
The syntax for that is:
|
| 32 |
conditional-stylesheets[CONDITIONAL][MEDIA][] = stylesheet.css
|
| 33 |
|
| 34 |
where
|
| 35 |
CONDITION can be any of the conditions specified in:
|
| 36 |
http://msdn.microsoft.com/en-us/library/ms537512.aspx
|
| 37 |
MEDIA can be any of the normal CSS media keywords.
|
| 38 |
|
| 39 |
For example, to add a stylesheet that only targets IE 6 and below, use:
|
| 40 |
conditional-stylesheets[if lt IE 7][all][] = ie6-and-below.css
|
| 41 |
|
| 42 |
And to add a print stylesheet for IE8 only, use:
|
| 43 |
conditional-stylesheets[if IE 8][print][] = ie8.css
|
| 44 |
|
| 45 |
|
| 46 |
*** IMPORTANT ***
|
| 47 |
|
| 48 |
Drupal 6 also stores a cache of the data in .info files. If you modify any lines
|
| 49 |
in your theme's .info file, you MUST refresh Drupal 6's cache by simply visiting
|
| 50 |
the admin/build/themes page.
|