<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James Hopkins &#187; Drupal</title>
	<atom:link href="http://jhop.me/tag/drupal/feed" rel="self" type="application/rss+xml" />
	<link>http://jhop.me</link>
	<description></description>
	<lastBuildDate>Sun, 06 Nov 2011 15:43:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Removing all those pesky style element declarations in Drupal (to accommodate IE6)</title>
		<link>http://jhop.me/css/removing-all-those-pesky-style-element-declarations-in-drupal-to-accommodate-ie6</link>
		<comments>http://jhop.me/css/removing-all-those-pesky-style-element-declarations-in-drupal-to-accommodate-ie6#comments</comments>
		<pubDate>Sat, 11 Oct 2008 00:28:36 +0000</pubDate>
		<dc:creator>James Hopkins</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://idreamincode.co.uk/css/removing-all-those-pesky-style-element-declarations-in-drupal-to-accommodate-ie6</guid>
		<description><![CDATA[Some of you may already be aware that IE6 has a limitation of reading only up to 30 external stylesheet declarations (when using either the style element, link element or @import rule). This figure may seem ridiculously high, and you might be thinking that an author with that many individual declarations doesn&#8217;t have a clue [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may already be aware that IE6 has a <a href="http://support.microsoft.com/kb/262161">limitation of reading only up to 30 external stylesheet declarations</a> (when using either the <code>style</code> element, <code>link</code> element or <code>@import</code> rule). This figure may seem ridiculously high, and you might be thinking that an author with that many individual declarations doesn&#8217;t have a clue about organization, but this is what out-of-the-box Drupal serves you (<a href="http://drupal.org/node/228818">Drupal.org related post</a>).If you&#8217;re working on a fairly large Drupal site which employs a number of different modules, then you may well experience this problem. The issue is that many Drupal modules that have any kind of theming side of them include their own (sometimes very hacky) stylesheets; so when one of these modules is installed, Drupal adds a link to this stylesheet by means of a <code>style</code> element declaration &#8211; yes thats right, one for every module.</p>
<p>I&#8217;m currently working on a large-scale Drupal site which includes a large number of modules, each with their own styleshee. As already mentioned, IE6 (and below) ignore any stylesheet declarations (using <code>style</code> or <code>link</code> elements) after 30 instances. Add to this the numberous non-module stylesheets (Drupal core &amp; IE-specific) and you&#8217;re well on your to reaching IE6s limit.</p>
<p>So, what are the solutions?</p>
<h3>Aggregate &amp; Compress CSS within Drupal</h3>
<p>Drupal recognises the issue of an additional HTTP request required for each module stylesheet. Fortunately this feature gets around the IE6 issue by aggregating all module and core stylesheets into one instance for each stylesheet media type defined. You can access this feature by logging in as an Admin and going to <code>Site Configuration</code> &gt; <code>Performance</code></p>
<p>However this method caches CSS too, which means it&#8217;s far from ideal whilst theming development is taking place.</p>
<h3>Unsetting stylesheets within template.php and using @import</h3>
<p>You can disable any module stylesheets from being included by unsetting them from within <code>template.php</code>. First get the stylesheet array by using <code>$css = drupal_add_css()</code> and then go ahead and unset all stylesheets (which will then all be linked to from within just one). Your snippet will look something like this:-</p>
<p><code># get array of stylesheets<br />
$css = drupal_add_css();<br />
unset($css['all']['module']['modules/system/system.css']);<br />
unset($css['all']['module']['modules/system/defaults.css']);<br />
unset($css['print']['theme']['themes/mytheme/print.css']);<br />
</code><br />
Now you would go ahead and use the <code>@import</code> rule to import your stylesheets through one of your theme-level stylesheets. The issue however, still exists that if you have more than 30 being imported within a single document, stylesheets that are &lt;30 will be ignored. To only workaround is to create a new stylesheet in this case, specifically for importing the remaining stylesheets.</p>
]]></content:encoded>
			<wfw:commentRss>http://jhop.me/css/removing-all-those-pesky-style-element-declarations-in-drupal-to-accommodate-ie6/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s all about Drupal&#8230;</title>
		<link>http://jhop.me/general-stuff/its-all-about-drupal</link>
		<comments>http://jhop.me/general-stuff/its-all-about-drupal#comments</comments>
		<pubDate>Thu, 07 Aug 2008 19:31:46 +0000</pubDate>
		<dc:creator>James Hopkins</dc:creator>
				<category><![CDATA[General stuff]]></category>
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://idreamincode.co.uk/general-stuff/its-all-about-drupal</guid>
		<description><![CDATA[[youtube:http://www.youtube.com/watch?v=lZ-s3DRZJKY&#38; 415 415]
]]></description>
			<content:encoded><![CDATA[<p>[youtube:http://www.youtube.com/watch?v=lZ-s3DRZJKY&amp; 415 415]</p>
]]></content:encoded>
			<wfw:commentRss>http://jhop.me/general-stuff/its-all-about-drupal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

