? clean-conditional-styles-4.patch
? clean-conditional-styles-5.patch
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/README.txt,v
retrieving revision 1.1.2.2.2.4
diff -u -p -r1.1.2.2.2.4 README.txt
--- README.txt	27 Oct 2009 00:21:49 -0000	1.1.2.2.2.4
+++ README.txt	13 May 2010 13:04:13 -0000
@@ -27,6 +27,7 @@ Features:
 - Relative font sizes
 - Large base font size
 - Fancy blog and comment submission dates
+- Add IE conditional stylesheets in info file
 
 IMPORTANT
 ---------
@@ -46,24 +47,13 @@ USAGE
 Clean theme's CSS rules have been split into multiple files to facilitate
 hot-swapping.
 
-There is an extra/ folder in the theme where you will find additional CSS
-files which you can use to easily apply a different base style to the site you
-are working on. Clean theme was designed in this way to help developers get
-closer to the finishing line before they have to get their hands dirty.
-
-To switch to using one of the other themes just edit the stylesheets[] in the
-info file. For example, the lightondark CSS folder has 2 files, color.css and
-navigation.css. To use the lightondark theme as a foundation for a new site
-simply prefix the existing paths for those 2 files with "extra/lightondark/":
+Clean theme uses code from conditional styles module:
 
-stylesheets[all][] = extra/lightondark/css/color.css
-stylesheets[all][] = extra/lightondark/css/navigation.css
+http://drupal.org/node/426486
 
-Then visit the themes admin page (admin/build/themes) to refresh the info file
-cache.
+This feature allows you to define IE conditional stylesheets in your theme info file:
 
-Different themes may contain different files so check which files you need to
-edit the paths for and add the prefix.
+conditional-stylesheets[if lte IE 8][all][] = css/ie-lt8.css
 
 CONTRIBUTE
 ----------
Index: clean.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/Attic/clean.info,v
retrieving revision 1.1.2.10.2.2
diff -u -p -r1.1.2.10.2.2 clean.info
--- clean.info	2 Dec 2009 00:31:00 -0000	1.1.2.10.2.2
+++ clean.info	13 May 2010 13:04:13 -0000
@@ -11,6 +11,7 @@ stylesheets[all][] = css/layout.css
 stylesheets[all][] = css/navigation.css
 stylesheets[all][] = css/typography.css
 stylesheets[all][] = css/color.css
+conditional-stylesheets[if lt IE 8][all][] = css/ie-lt8.css
 scripts[] = js/clean.js
 regions[left] = Left sidebar
 regions[right] = Right sidebar
Index: page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/page.tpl.php,v
retrieving revision 1.1.2.5.2.14.2.12
diff -u -p -r1.1.2.5.2.14.2.12 page.tpl.php
--- page.tpl.php	1 Mar 2010 13:37:46 -0000	1.1.2.5.2.14.2.12
+++ page.tpl.php	13 May 2010 13:04:13 -0000
@@ -6,7 +6,6 @@
 <head>
   <?php print $head; ?>
   <?php print $styles; ?>
-  <!--[if lt IE 8]><link type="text/css" rel="stylesheet" media="all" href="<?php print $base_theme; ?>css/ie-lt8.css" /><![endif]-->
   <?php print $scripts; ?>
   <title><?php print $head_title; ?></title>
 </head>
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/template.php,v
retrieving revision 1.1.2.7.2.17.2.36
diff -u -p -r1.1.2.7.2.17.2.36 template.php
--- template.php	21 Apr 2010 22:28:05 -0000	1.1.2.7.2.17.2.36
+++ template.php	13 May 2010 13:04:14 -0000
@@ -9,7 +9,16 @@ if (theme_get_setting('clean_rebuild_reg
 /**
  * Implementation of hook_theme().
  */
-function clean_theme() {
+function clean_theme(&$existing, $type, $theme, $path) {
+  
+  // Compute the conditional stylesheets.
+  if (!module_exists('conditional_styles')) {
+    include_once $base_path . drupal_get_path('theme', 'clean') . '/template.conditional-styles.inc';
+    // _conditional_styles_theme() only needs to be run once.
+    if ($theme == 'clean') {
+      _conditional_styles_theme($existing, $type, $theme, $path);
+    }
+  }
   return array(
     'fieldset' => array(
       'arguments' => array('element' => array()),
@@ -118,6 +127,10 @@ function clean_preprocess_page(&$variabl
   }
 
   $variables['styles'] = drupal_get_css(clean_css_stripped());
+  // Add conditional stylesheets.
+  if (!module_exists('conditional_styles')) {
+    $variables['styles'] .= $variables['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
+  }
 }
 
 function clean_html_attributes(&$variables) {
Index: subthemes/clean_1kb/page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/subthemes/clean_1kb/Attic/page.tpl.php,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 page.tpl.php
--- subthemes/clean_1kb/page.tpl.php	22 Apr 2010 13:50:30 -0000	1.1.2.3
+++ subthemes/clean_1kb/page.tpl.php	13 May 2010 13:04:14 -0000
@@ -6,7 +6,6 @@
 <head>
   <?php print $head; ?>
   <?php print $styles; ?>
-  <!--[if lt IE 8]><link type="text/css" rel="stylesheet" media="all" href="<?php print $path; ?>/css/ie-lt8.css" /><![endif]-->
   <?php print $scripts; ?>
   <title><?php print $head_title; ?></title>
 </head>
Index: subthemes/clean_1kb/template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/subthemes/clean_1kb/Attic/template.php,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 template.php
--- subthemes/clean_1kb/template.php	11 Apr 2010 22:57:47 -0000	1.1.2.4
+++ subthemes/clean_1kb/template.php	13 May 2010 13:04:14 -0000
@@ -114,4 +114,9 @@ function clean_1kb_preprocess_page(&$var
 
   // Rebuild styles variable.
   $variables['styles'] = drupal_get_css(clean_css_stripped());
+  
+  // Add conditional stylesheets.
+  if (!module_exists('conditional_styles')) {
+    $variables['styles'] .= $variables['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
+  }
 }
Index: subthemes/clean_960gs/page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/subthemes/clean_960gs/Attic/page.tpl.php,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 page.tpl.php
--- subthemes/clean_960gs/page.tpl.php	22 Apr 2010 13:50:30 -0000	1.1.2.4
+++ subthemes/clean_960gs/page.tpl.php	13 May 2010 13:04:14 -0000
@@ -6,7 +6,6 @@
 <head>
   <?php print $head; ?>
   <?php print $styles; ?>
-  <!--[if lt IE 8]><link type="text/css" rel="stylesheet" media="all" href="<?php print $path; ?>/css/ie-lt8.css" /><![endif]-->
   <?php print $scripts; ?>
   <title><?php print $head_title; ?></title>
 </head>
Index: subthemes/clean_liquid/page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/clean/subthemes/clean_liquid/Attic/page.tpl.php,v
retrieving revision 1.1.2.1.2.6
diff -u -p -r1.1.2.1.2.6 page.tpl.php
--- subthemes/clean_liquid/page.tpl.php	22 Apr 2010 13:50:30 -0000	1.1.2.1.2.6
+++ subthemes/clean_liquid/page.tpl.php	13 May 2010 13:04:14 -0000
@@ -6,7 +6,6 @@
 <head>
   <?php print $head; ?>
   <?php print $styles; ?>
-  <!--[if lt IE 8]><link type="text/css" rel="stylesheet" media="all" href="<?php print $path; ?>/css/ie-lt8.css" /><![endif]-->
   <?php print $scripts; ?>
   <title><?php print $head_title; ?></title>
 </head>
