<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>css-selectors &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/css-selectors/</link>
	<description>Feed of posts on WordPress.com tagged "css-selectors"</description>
	<pubDate>Sun, 20 Jul 2008 14:43:17 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[CSS3: css variables are a bad idea. Just allow us to call other selectors.]]></title>
<link>http://rip747.wordpress.com/?p=402</link>
<pubDate>Thu, 10 Apr 2008 12:29:43 +0000</pubDate>
<dc:creator>rip747</dc:creator>
<guid>http://rip747.wordpress.com/?p=402</guid>
<description><![CDATA[Everytime I hear about CSS3 allowing the use of variables, I cringe.  I can tell right off the bat t]]></description>
<content:encoded><![CDATA[<p>Everytime I hear about <a href="http://www.dave-woods.co.uk/index.php/css-variables/" target="_blank">CSS3 allowing the use of variables</a>, I cringe.  I can tell right off the bat that this is an extremely bad idea and will be abused beyond belief.</p>
<p>One of the ways I propose replacing this up and coming feature is by just allowing us to call other selectors within a selector. I'll demonstrate:</p>
<blockquote><p>&#60;style type="text/css"&#62;<br />
.bold {font-weight:bold;}<br />
.blue {color:blue;}<br />
.testingagain {selectors:.bold, .blue;}<br />
&#60;/style&#62;<br />
&#60;p class="testingagain"&#62;testing this out&#60;/p&#62;</p></blockquote>
<p>In the above code block the testingagain class would inherit the properties of both the bold and the blue selectors. Further more you could overwrite them, just as you do now.</p>
<blockquote><p>&#60;style type="text/css"&#62;<br />
.bold {font-weight:bold;}<br />
.blue {color:blue;}<br />
.testingagain<br />
{<br />
selectors:.bold, .blue;<br />
font-weight:normal;<br />
}<br />
&#60;/style&#62;<br />
&#60;p class="testingagain"&#62;testing this out&#60;/p&#62;</p></blockquote>
<p><strong>Hell, let's get jiggy with it:</strong></p>
<blockquote><p>&#60;style type="text/css"&#62;<br />
.cool {font-weight:bold;color:blue;}<br />
.shout{background-color:red;text-align:center;text-decoration:underline;}<br />
.testingagain<br />
{<br />
selectors:.cool, .shout;<br />
font-weight:normal;<br />
text-decoration:none;<br />
background-color:yellow;<br />
}<br />
&#60;/style&#62;<br />
&#60;p class="testingagain"&#62;testing this out&#60;/p&#62;</p></blockquote>
<p><strong>Why I like this method</strong></p>
<p>Because you can already do it now! You have to do it in the HTML like so</p>
<blockquote><p>&#60;style type="text/css"&#62;<br />
.bold {font-weight:bold;}<br />
.blue {color:blue;}<br />
&#60;/style&#62;<br />
&#60;p class="bold blue"&#62;testing this out&#60;/p&#62;</p></blockquote>
<p>With my proposed method it moves this into the css file for easier maintenance and readbility.</p>
<p>So what do you think?</p>
]]></content:encoded>
</item>

</channel>
</rss>
