<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html">DevKick Forums - Browser-specific @imports</title>
	<link rel="self" href="/talk/rewrite.php"/>
	<updated>2008-05-15T12:58:32Z</updated>
	<generator>FluxBB</generator>
	<id>http://devkick.com/talk/topic/10/browserspecific-imports/</id>
		<entry>
			<title type="html">Re: Browser-specific @imports</title>
			<link rel="alternate" href="http://devkick.com/talk/post/27/#p27"/>
			<content type="html">Hi David,

that was something I didn&#039;t get on your replies at the blog post: why IE5/OSX hacks couldn&#039;t go directly on the IE style sheet? As I understand you&#039;re saying they need to be on their own standalone style sheet, why?

I prefer the CC way too. 
Also, although the idea of linking just one stylesheet is appealing, I think it&#039;s more a matter of user preference. In fact, you have already done it on tripoli.css and tripoli-ie.css, or am I wrong?

Finally, regarding the order of linking the stylesheets, this is the one I currently prefer:

[code]
&lt;!-- Tripoli - a CSS standard for HTML rendering --&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/tripoli.base.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/tripoli.visual.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
&lt;!--[if lte IE 7]&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/css/tripoli.base.ie.css&quot; media=&quot;all&quot;&gt;
&lt;![endif]--&gt;
&lt;!-- / + info: http://devkick.com/lab/tripoli/ --&gt;

&lt;!-- my own set of style sheets, so I can easily override any Tripoli default, even IE specific rules --&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/mycss1.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/mycss2.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;

&lt;!-- Tripoli - (print CSS) --&gt;
 &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;
&lt;!-- / + info: http://devkick.com/lab/tripoli/ --&gt;

&lt;!-- finally, my own IE-specific style sheet, it lets me override (for IE6/7, of course) any rule on any stylesheet above, doesn&#039;t matter which one (tripoli, my own set, print, etc) --&gt;
&lt;!--[if lte IE 7]&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/css/ie-custom.css&quot; media=&quot;all&quot;&gt;
&lt;![endif]--&gt;
[/code]

What do you think?</content>
			<author>
				<name>maniqui</name>
			</author>
			<updated>2008-05-15T12:58:32Z</updated>
			<id>http://devkick.com/talk/post/27/#p27</id>
		</entry>
		<entry>
			<title type="html">Browser-specific @imports</title>
			<link rel="alternate" href="http://devkick.com/talk/post/18/#p18"/>
			<content type="html">One idea I have been considering is if it&#039;s cleaner to have different import statements for different browsers from one master stylesheet. As of now, I use a minimal amount of browser-specific &quot;hacks&quot; in the base stylesheet. But there are ways to import stylesheets instead of using inline hacks, like ex:

[code]@import: url(&quot;ie.css&quot;);[/code]

(note the colon) Only IE will import this stylesheet. We could do the same for opera and IE5/mac, but since these rules are minimal, I&#039;m just not very comfortable having too many server requests for such little code.

In general, I like the conditional comments way of targeting IE, because I know it always works and it&#039;s future-proof; no-one really knows how future versions of IE will treat weird CSS hacks that have worked before.

On the other hand - I kind of like the idea of having only one stylesheet in the HTML source and then import the needed fixes for each browser.

Any thoughts?</content>
			<author>
				<name>David</name>
			</author>
			<updated>2008-05-13T12:34:23Z</updated>
			<id>http://devkick.com/talk/post/18/#p18</id>
		</entry>
</feed>
