<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Don&#8217;t use &#8220;!important&#8221;</title>
	<atom:link href="http://james.padolsey.com/usability/dont-use-important/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/usability/dont-use-important/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 02 Feb 2012 18:03:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Meshach</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-9824</link>
		<dc:creator>Meshach</dc:creator>
		<pubDate>Sun, 12 Apr 2009 21:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-9824</guid>
		<description>Wouldn&#039;t it be better to do the star hack?

&lt;pre lang=&quot;css&quot;&gt;
* html #div {
  selector:value;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t it be better to do the star hack?</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span class="sy0">*</span> html <span class="re0">#div</span> <span class="br0">&#123;</span>
  selector<span class="sy0">:</span>value<span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Wellman</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8966</link>
		<dc:creator>Dan Wellman</dc:creator>
		<pubDate>Thu, 02 Apr 2009 11:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8966</guid>
		<description>Hi James, great site!

Sometimes !important can be useful for overriding dynamically added inline styles (e.g. like when changing CSS rules with jQuery). That&#039;s about the only time I ever use it, I never put it into a stylesheet :D</description>
		<content:encoded><![CDATA[<p>Hi James, great site!</p>
<p>Sometimes !important can be useful for overriding dynamically added inline styles (e.g. like when changing CSS rules with jQuery). That&#8217;s about the only time I ever use it, I never put it into a stylesheet <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham B</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8807</link>
		<dc:creator>Graham B</dc:creator>
		<pubDate>Mon, 30 Mar 2009 20:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8807</guid>
		<description>Good advice. Unfortunately Sitepoint&#039;s recent &quot;10 fixes that solves IE6 problems&quot; article specifically promoted the use of !important. One step forward, two steps back.</description>
		<content:encoded><![CDATA[<p>Good advice. Unfortunately Sitepoint&#8217;s recent &#8220;10 fixes that solves IE6 problems&#8221; article specifically promoted the use of !important. One step forward, two steps back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J. Albert Bowden II</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8616</link>
		<dc:creator>J. Albert Bowden II</dc:creator>
		<pubDate>Thu, 26 Mar 2009 01:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8616</guid>
		<description>NICE! I couldn&#039;t agree with you more!</description>
		<content:encoded><![CDATA[<p>NICE! I couldn&#8217;t agree with you more!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8315</link>
		<dc:creator>Shane</dc:creator>
		<pubDate>Sat, 21 Mar 2009 13:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8315</guid>
		<description>The CSS is packaged up in the control - you add a reference to your control and the framework automatically puts in the CSS reference after any you&#039;ve put in.

No - in this particular instance, there&#039;s no way around.</description>
		<content:encoded><![CDATA[<p>The CSS is packaged up in the control &#8211; you add a reference to your control and the framework automatically puts in the CSS reference after any you&#8217;ve put in.</p>
<p>No &#8211; in this particular instance, there&#8217;s no way around.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8307</link>
		<dc:creator>James</dc:creator>
		<pubDate>Sat, 21 Mar 2009 09:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8307</guid>
		<description>@&lt;a href=&quot;#comment-8243&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Marin&lt;/strong&gt;&lt;/a&gt;, &lt;a href=&quot;#comment-8272&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Mark&lt;/strong&gt;&lt;/a&gt;, I guess that&#039;s another exception. Of course, you could always do something more hacky to target IE6, like:

&lt;pre lang=&quot;css&quot;&gt;
_height: 500px; /* IE6 */
min-height: 500px;
&lt;/pre&gt;

I&#039;m not sure which approach is better... &#039;!important&#039; may be the better option here, to be honest.

@&lt;a href=&quot;#comment-8259&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Shane&lt;/strong&gt;&lt;/a&gt;, that really sucks about .NET. Can&#039;t those &quot;controls&quot; be changed or configured somehow?</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-8243"><strong>Marin</strong></a>, <a href="#comment-8272"><strong>Mark</strong></a>, I guess that&#8217;s another exception. Of course, you could always do something more hacky to target IE6, like:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">_height<span class="sy0">:</span> <span class="re3">500px</span><span class="sy0">;</span> <span class="coMULTI">/* IE6 */</span>
<span class="kw1">min-height</span><span class="sy0">:</span> <span class="re3">500px</span><span class="sy0">;</span></pre></div></div>

<p>I&#8217;m not sure which approach is better&#8230; &#8216;!important&#8217; may be the better option here, to be honest.</p>
<p>@<a href="#comment-8259"><strong>Shane</strong></a>, that really sucks about .NET. Can&#8217;t those &#8220;controls&#8221; be changed or configured somehow?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8272</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 20 Mar 2009 19:57:13 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8272</guid>
		<description>I agree about specificity. I use !important *only* to counteract very few FF/IE7/Safari/Chrome vs. IE6 issues when a CSS reset doesn&#039;t seem to fix the inconsistency. I&#039;ve never had problems with this method.

E.g.
margin: 2px 0 0 3px !important; /* good browsers */
margin: 7px 0 0 3px; /* IE6 only */</description>
		<content:encoded><![CDATA[<p>I agree about specificity. I use !important *only* to counteract very few FF/IE7/Safari/Chrome vs. IE6 issues when a CSS reset doesn&#8217;t seem to fix the inconsistency. I&#8217;ve never had problems with this method.</p>
<p>E.g.<br />
margin: 2px 0 0 3px !important; /* good browsers */<br />
margin: 7px 0 0 3px; /* IE6 only */</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8259</link>
		<dc:creator>Shane</dc:creator>
		<pubDate>Fri, 20 Mar 2009 14:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8259</guid>
		<description>I&#039;ve had to use !important on ASP.NET websites that use custom controls that come packaged with their own CSS.

The control framework inserts markup requesting the control CSS after any CSS you&#039;ve referenced in the head section (whether it&#039;s by referencing a stylesheet or inline CSS - eugh :) ).  

The only way to override the controls&#039; CSS is by using important.  It&#039;s not something that I like doing, and this is a specific ASP.NET example, but it&#039;s where I have had to use !important.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had to use !important on ASP.NET websites that use custom controls that come packaged with their own CSS.</p>
<p>The control framework inserts markup requesting the control CSS after any CSS you&#8217;ve referenced in the head section (whether it&#8217;s by referencing a stylesheet or inline CSS &#8211; eugh <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).  </p>
<p>The only way to override the controls&#8217; CSS is by using important.  It&#8217;s not something that I like doing, and this is a specific ASP.NET example, but it&#8217;s where I have had to use !important.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marin</title>
		<link>http://james.padolsey.com/usability/dont-use-important/comment-page-1/#comment-8243</link>
		<dc:creator>Marin</dc:creator>
		<pubDate>Fri, 20 Mar 2009 08:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=676#comment-8243</guid>
		<description>The precedence is well explained with those Star Wars characters:
http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html

Sometimes, you can&#039;t escape from the !important (min-height on IE6) but of course, you need to know what you&#039;re doing.</description>
		<content:encoded><![CDATA[<p>The precedence is well explained with those Star Wars characters:<br />
<a href="http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html">http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html</a></p>
<p>Sometimes, you can&#8217;t escape from the !important (min-height on IE6) but of course, you need to know what you&#8217;re doing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

