<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Microsoft says: de-hack your CSS</title>
	<atom:link href="http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Tue, 02 Dec 2008 02:24:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: bkemper@providen</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13561</link>
		<dc:creator>bkemper@providen</dc:creator>
		<pubDate>Mon, 06 Feb 2006 01:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13561</guid>
		<description>Yes, something like this is what I was thinking:

&lt;code&gt;
/*[if lte IE 7]/
    .ieOnly { margin-left:2px; }
/[endif]*/
&lt;/code&gt;

...which would be great, except it would kind of need another way of commenting within that block, since &lt;code&gt;*/&lt;/code&gt; would close off what other browsers would see as comments. Maybe they could substitute a tilde for the asterix or something.</description>
		<content:encoded><![CDATA[<p>Yes, something like this is what I was thinking:</p>
<code>
/*[if lte IE 7]/
    .ieOnly { margin-left:2px; }
/[endif]*/
</code>
<p>&#8230;which would be great, except it would kind of need another way of commenting within that block, since <code>*/</code> would close off what other browsers would see as comments. Maybe they could substitute a tilde for the asterix or something.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Yank</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13560</link>
		<dc:creator>Kevin Yank</dc:creator>
		<pubDate>Mon, 06 Feb 2006 00:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13560</guid>
		<description>&lt;blockquote&gt;And then when IE version 7.5 or 8.0 or whatever comes along, you get to do this all over again, editing every single darn page in every site you’re responsible for, to link to its own separate IE-only CSS file(s).&lt;/blockquote&gt;
Agreed, this is the painful downside of conditional comments. If Microsoft were smart, they'd include a similar mechanism within CSS itself (an @x-browser rule, for instance), which would permit filtering within the CSS code itself.</description>
		<content:encoded><![CDATA[<blockquote><p>And then when IE version 7.5 or 8.0 or whatever comes along, you get to do this all over again, editing every single darn page in every site you’re responsible for, to link to its own separate IE-only CSS file(s).</p></blockquote>
<p>Agreed, this is the painful downside of conditional comments. If Microsoft were smart, they&#8217;d include a similar mechanism within CSS itself (an @x-browser rule, for instance), which would permit filtering within the CSS code itself.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: bkemper@providen</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13499</link>
		<dc:creator>bkemper@providen</dc:creator>
		<pubDate>Sat, 04 Feb 2006 02:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13499</guid>
		<description>You're clearly not getting it right. 

You do not have to make two versions of your site. Instead, they want us to add code (the "conditional" statements) to every page that links an Explorer-only CSS file into that page. There would be only one extra CSS for the whole site, or perhaps a couple more if you wanted to use the same method to target other versions of Explorer. 

And then when IE version 7.5 or 8.0 or whatever comes along, you get to do this all over again, editing every single darn page in every site you're responsible for, to link to its own separate IE-only CSS file(s).</description>
		<content:encoded><![CDATA[<p>You&#8217;re clearly not getting it right. </p>
<p>You do not have to make two versions of your site. Instead, they want us to add code (the &#8220;conditional&#8221; statements) to every page that links an Explorer-only CSS file into that page. There would be only one extra CSS for the whole site, or perhaps a couple more if you wanted to use the same method to target other versions of Explorer. </p>
<p>And then when IE version 7.5 or 8.0 or whatever comes along, you get to do this all over again, editing every single darn page in every site you&#8217;re responsible for, to link to its own separate IE-only CSS file(s).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: chad</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13494</link>
		<dc:creator>chad</dc:creator>
		<pubDate>Fri, 03 Feb 2006 20:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13494</guid>
		<description>So, if I'm getting this right...

I can make a site that works in everything except IE, or I can make a site that works only in IE, so the answer is to essentially make two versions of my site by including hacks or filters that cause my code to be read differently.  Making two versions of the same site is a pain.

Microsoft's answer with IE7 is essentially: That's an easy fix! Just make two versions of your site!</description>
		<content:encoded><![CDATA[<p>So, if I&#8217;m getting this right&#8230;</p>
<p>I can make a site that works in everything except IE, or I can make a site that works only in IE, so the answer is to essentially make two versions of my site by including hacks or filters that cause my code to be read differently.  Making two versions of the same site is a pain.</p>
<p>Microsoft&#8217;s answer with IE7 is essentially: That&#8217;s an easy fix! Just make two versions of your site!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Gagne</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13409</link>
		<dc:creator>Nick Gagne</dc:creator>
		<pubDate>Wed, 01 Feb 2006 14:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-13409</guid>
		<description>There is a css hack that works for all versions of internet explorer, including ie7. You can read about it here:
&lt;a href="http://www.ibloomstudios.com/article7/" rel="nofollow"&gt;The IE7 CSS Hack&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>There is a css hack that works for all versions of internet explorer, including ie7. You can read about it here:<br />
<a href="http://www.ibloomstudios.com/article7/" rel="nofollow">The IE7 CSS Hack</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Yank</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10694</link>
		<dc:creator>Kevin Yank</dc:creator>
		<pubDate>Fri, 11 Nov 2005 05:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10694</guid>
		<description>&lt;blockquote&gt;I think IE7 is suppose to support “before”.&lt;/blockquote&gt;

I'm afraid not. Generated content (using the &lt;code&gt;:before&lt;/code&gt;/&lt;code&gt;:after&lt;/code&gt; pseudoclasses and the &lt;code&gt;content&lt;/code&gt; property) has been confirmed as &lt;a href="http://www.sitepoint.com/blogs/2005/11/02/what-wont-be-fixed-in-ie7/" rel="nofollow"&gt;one of the features that won't make it into IE7&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<blockquote><p>I think IE7 is suppose to support “before”.</p></blockquote>
<p>I&#8217;m afraid not. Generated content (using the <code>:before</code>/<code>:after</code> pseudoclasses and the <code>content</code> property) has been confirmed as <a href="http://www.sitepoint.com/blogs/2005/11/02/what-wont-be-fixed-in-ie7/" rel="nofollow">one of the features that won&#8217;t make it into IE7</a>.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: baseiber</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10684</link>
		<dc:creator>baseiber</dc:creator>
		<pubDate>Thu, 10 Nov 2005 22:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10684</guid>
		<description>I think IE7 is suppose to support "before". Frankly I'd prefer to use text-shadow as it's suppose to be a standard but only Safari supports it.</description>
		<content:encoded><![CDATA[<p>I think IE7 is suppose to support &#8220;before&#8221;. Frankly I&#8217;d prefer to use text-shadow as it&#8217;s suppose to be a standard but only Safari supports it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AlexW</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10665</link>
		<dc:creator>AlexW</dc:creator>
		<pubDate>Thu, 10 Nov 2005 01:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10665</guid>
		<description>&lt;blockquote&gt;What about when we want something to work for everything except IE browsers.&lt;/blockquote&gt;

In the case you mentioned the browsers would happily ignore each other. wouldn't they? IE doesn't understand ':before' and the others don't &lt;em&gt;get &lt;/em&gt;'filter:'. 

Hupothetically speaking, there is a 'not' operator too () but it's only really useful for telling which IE should read the rule -- not which browser brand. 

To target code to only non-IE browsers I'd think you'd write it to all browsers, then cancel it out inside the conditional comments.

&lt;code&gt;
&#60;style text="css/text"&#62; 
/* All browser code */ 
...
&#60;!--[if IE]&#62;
/* reset code to defaults for IE */ 
...
&#60;![endif]--&#62; 
&#60;/style&#62;
&lt;/code&gt;

Personally I wouldn't use the 'before' hack to do shadows. Non-scalable. Needs a new rule for each heading shadow. 

I published a &lt;a href="http://www.sitepoint.com/newsletter/viewissue.php?id=5&#38;issue=7&#38;format=html#6" rel="nofollow"&gt;DOM based method to do text shadows&lt;/a&gt; earlier in the year that renders a &lt;a href="http://www.sitepoint.com/examples/textshadows/" rel="nofollow"&gt;much nicer finished product&lt;/a&gt; and is as scalabe as you want it to be.  Non JS browsers leave the text plain. No disaster.

It's only drawback is an accessibility issue  -- multiple instances of the heading text that all get recited like an echo. But since all screen readers that I know of use IE as their rendering engine (so we assume screen readers understand conditional comments too) you could use the IE shadow filter there and the DOM method everywhere else.</description>
		<content:encoded><![CDATA[<blockquote><p>What about when we want something to work for everything except IE browsers.</p></blockquote>
<p>In the case you mentioned the browsers would happily ignore each other. wouldn&#8217;t they? IE doesn&#8217;t understand &#8216;:before&#8217; and the others don&#8217;t <em>get </em>&#8216;filter:&#8217;. </p>
<p>Hupothetically speaking, there is a &#8216;not&#8217; operator too () but it&#8217;s only really useful for telling which IE should read the rule &#8212; not which browser brand. </p>
<p>To target code to only non-IE browsers I&#8217;d think you&#8217;d write it to all browsers, then cancel it out inside the conditional comments.</p>
<code>
&lt;style text="css/text"&gt; 
/* All browser code */ 
...
&lt;!--[if IE]&gt;
/* reset code to defaults for IE */ 
...
&lt;![endif]--&gt; 
&lt;/style&gt;
</code>
<p>Personally I wouldn&#8217;t use the &#8216;before&#8217; hack to do shadows. Non-scalable. Needs a new rule for each heading shadow. </p>
<p>I published a <a href="http://www.sitepoint.com/newsletter/viewissue.php?id=5&amp;issue=7&amp;format=html#6" rel="nofollow">DOM based method to do text shadows</a> earlier in the year that renders a <a href="http://www.sitepoint.com/examples/textshadows/" rel="nofollow">much nicer finished product</a> and is as scalabe as you want it to be.  Non JS browsers leave the text plain. No disaster.</p>
<p>It&#8217;s only drawback is an accessibility issue  &#8212; multiple instances of the heading text that all get recited like an echo. But since all screen readers that I know of use IE as their rendering engine (so we assume screen readers understand conditional comments too) you could use the IE shadow filter there and the DOM method everywhere else.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: baseiber</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10655</link>
		<dc:creator>baseiber</dc:creator>
		<pubDate>Wed, 09 Nov 2005 18:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10655</guid>
		<description>What about when we want something to work for everything except IE browsers.

example:
&lt;pre&gt;&lt;code&gt;
h1 
{/* for ie only*/
     filter:shadow(color=#001933,direction=-115);	  
}
	
h1:before 
{/* creates shadow for non-ie browsers */
	display:block;
	margin:0 0 -1.3em .15em;
	padding:0;
	color:#001933; 
	content:'some text';
}&lt;/code&gt;&lt;/pre&gt;

I prefer how the IE shadow looks but it's not supported by other browsers.</description>
		<content:encoded><![CDATA[<p>What about when we want something to work for everything except IE browsers.</p>
<p>example:</p>
<pre><code>
h1 
{/* for ie only*/
     filter:shadow(color=#001933,direction=-115);	  
}
	
h1:before 
{/* creates shadow for non-ie browsers */
	display:block;
	margin:0 0 -1.3em .15em;
	padding:0;
	color:#001933; 
	content:'some text';
}</code></pre>
<p>I prefer how the IE shadow looks but it&#8217;s not supported by other browsers.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: mikeall</title>
		<link>http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10626</link>
		<dc:creator>mikeall</dc:creator>
		<pubDate>Wed, 09 Nov 2005 06:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/2005/10/13/microsoft-says-de-hack-your-css/#comment-10626</guid>
		<description>I will be striving to get even more people to use other browsers now! This has the potential to cause big headaches.</description>
		<content:encoded><![CDATA[<p>I will be striving to get even more people to use other browsers now! This has the potential to cause big headaches.</p>]]></content:encoded>
	</item>
</channel>
</rss>
