<?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: Write Better CSS with Less</title>
	<atom:link href="http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Sun, 22 Nov 2009 11:54:05 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: AussieJohn</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-928129</link>
		<dc:creator>AussieJohn</dc:creator>
		<pubDate>Sun, 05 Jul 2009 23:30:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-928129</guid>
		<description>@BerislavLopac: Don&#039;t forget that it&#039;s not always practical to add classes to elements, not to mention that it certainly isn&#039;t semantic in a lot of cases. With, as you suggested - a different syntax to indicate that a class is a mixin (something like &lt;code&gt;%mixinClassname&lt;/code&gt; or &lt;code&gt;+mixinClassname&lt;/code&gt; perhaps?). I think this could be a very successful feature of CSS.

@YahyaAziz Don&#039;t leave out the &lt;a href=&quot;http://lesscss.org/docs.html#nested_rules&quot; rel=&quot;nofollow&quot;&gt;nested rules&lt;/a&gt; :-) 

&lt;code&gt;#banner { 
2	  color: white; 
3	  background: black; 
4	    a { color: yellow; } 
5	    p { margin: 0em; } 
6	    ... 
7	} &lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@BerislavLopac: Don&#8217;t forget that it&#8217;s not always practical to add classes to elements, not to mention that it certainly isn&#8217;t semantic in a lot of cases. With, as you suggested &#8211; a different syntax to indicate that a class is a mixin (something like <code>%mixinClassname</code> or <code>+mixinClassname</code> perhaps?). I think this could be a very successful feature of CSS.</p>
<p>@YahyaAziz Don&#8217;t leave out the <a href="http://lesscss.org/docs.html#nested_rules" rel="nofollow">nested rules</a> :-) </p>
<code>#banner { 
2	  color: white; 
3	  background: black; 
4	    a { color: yellow; } 
5	    p { margin: 0em; } 
6	    ... 
7	} </code>]]></content:encoded>
	</item>
	<item>
		<title>By: BerislavLopac</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-928127</link>
		<dc:creator>BerislavLopac</dc:creator>
		<pubDate>Sun, 05 Jul 2009 21:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-928127</guid>
		<description>@YahyaAziz: The last item is completely unnecessary, as it can already be easily done as .footer.super.</description>
		<content:encoded><![CDATA[<p>@YahyaAziz: The last item is completely unnecessary, as it can already be easily done as .footer.super.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: YahyaAziz</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-928122</link>
		<dc:creator>YahyaAziz</dc:creator>
		<pubDate>Sun, 05 Jul 2009 20:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-928122</guid>
		<description>&lt;strong&gt;Raena&lt;/strong&gt;, thanks for an interesting (and obviously provocative!) article.

I agree with &lt;strong&gt;Molte&lt;/strong&gt;, who said: &quot;And when you say variable, don’t you mean constant?&quot;

I also agree with &lt;strong&gt;Arlen&lt;/strong&gt; - right up to the point when she or he (rather contentiously) implies that designers don&#039;t get the reusability of heritable class attributes.  I think that any designer worth her salt understands the principles of modularity and of design integrity very well indeed.

Why not campaign for the kinds of &lt;strong&gt;simple improvements to CSS&lt;/strong&gt; that would make &lt;strong&gt;all&lt;/strong&gt; these preprocessor-type tools unnecessary?  It wouldn&#039;t take much:

1. Include &lt;strong&gt;named constants&lt;/strong&gt; eg: 
@logo-color = #abcdef;

and invoke them with:
color: @logo-color;

2. Allow &lt;strong&gt;run-time arithmetic&lt;/strong&gt; on constants, eg:
@base = 960px;

invoked with:
width: @base / 3; 

3. Allow &lt;strong&gt;class inheritance&lt;/strong&gt;, as per Less&#039; mixin in Raena&#039;s example:
#super { 
	  #footer; 
	  font-family: cursive; 
	} 

Designers, just as much as programmers, would welcome the chance to (a) defer and (b) readily change, the decisions they take.  We all know that most design changes are customer-driven, and adding flexibility to respond quicker to customer requests makes everyone look good.

We&#039;re not talking an insurmountable extra run-time load involved in these kinds of changes (unless used to baroque excess).

Just my 5c. worth (Anyone seen two cents lately?)</description>
		<content:encoded><![CDATA[<p><strong>Raena</strong>, thanks for an interesting (and obviously provocative!) article.</p>
<p>I agree with <strong>Molte</strong>, who said: &#8220;And when you say variable, don’t you mean constant?&#8221;</p>
<p>I also agree with <strong>Arlen</strong> &#8211; right up to the point when she or he (rather contentiously) implies that designers don&#8217;t get the reusability of heritable class attributes.  I think that any designer worth her salt understands the principles of modularity and of design integrity very well indeed.</p>
<p>Why not campaign for the kinds of <strong>simple improvements to CSS</strong> that would make <strong>all</strong> these preprocessor-type tools unnecessary?  It wouldn&#8217;t take much:</p>
<p>1. Include <strong>named constants</strong> eg:<br />
@logo-color = #abcdef;</p>
<p>and invoke them with:<br />
color: @logo-color;</p>
<p>2. Allow <strong>run-time arithmetic</strong> on constants, eg:<br />
@base = 960px;</p>
<p>invoked with:<br />
width: @base / 3; </p>
<p>3. Allow <strong>class inheritance</strong>, as per Less&#8217; mixin in Raena&#8217;s example:<br />
#super {<br />
	  #footer;<br />
	  font-family: cursive;<br />
	} </p>
<p>Designers, just as much as programmers, would welcome the chance to (a) defer and (b) readily change, the decisions they take.  We all know that most design changes are customer-driven, and adding flexibility to respond quicker to customer requests makes everyone look good.</p>
<p>We&#8217;re not talking an insurmountable extra run-time load involved in these kinds of changes (unless used to baroque excess).</p>
<p>Just my 5c. worth (Anyone seen two cents lately?)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Arlen</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927983</link>
		<dc:creator>Arlen</dc:creator>
		<pubDate>Thu, 02 Jul 2009 14:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927983</guid>
		<description>@cloudhead OK, so your &quot;mixins&quot; are simply another way of doing what we&#039;ve been able to do for years without ever involving the CSS file in the first place, namely assigning a class to an element that has another class or id already assigned to it?

I&#039;m afraid the clarification doesn&#039;t change my assessment of it. There&#039;s still no way to tell from looking at it whether this is a class that was written for the purpose of styling an element, or a class/mixin/codechunk that was written solely for the purpose of being included in other ids/classes. And it still means that cleaning up after a development sprint will still require looking for that class/mixin/codechunk will require looking in not only the content files, but the less/css files for where it&#039;s used.

@raena, What I meant was that, like using the same variable name over and over, the Less mixin syntax leaves you no way to write it without having to leave commentary or other documentation behind to explain what you&#039;re doing (&quot;class A is a real class, but class B here is a fake class that only exists because I want to use it as a mixin&quot;). And code is like humor. When you *have* to explain it, it&#039;s bad code.

While I think all attempts to turn CSS into a programming language are misguided (it&#039;s a design language, it shouldn&#039;t take a developer&#039;s approach -- object oriented inheritance, and all that -- but rather a designer&#039;s approach) Less&#039;s mixin syntax bothers me more than others because it doesn&#039;t even get the programming approach right. That&#039;s the &quot;fatal flaw&quot; that will keep me from using Less.

@cloudhead makes a good point later in the post. While I can certainly empathize with @cloudhead&#039;s view of it (I don&#039;t use Sass, either) designers &quot;get&quot; picky indentation rules more easily than they &quot;get&quot; most standard development concepts.</description>
		<content:encoded><![CDATA[<p>@cloudhead OK, so your &#8220;mixins&#8221; are simply another way of doing what we&#8217;ve been able to do for years without ever involving the CSS file in the first place, namely assigning a class to an element that has another class or id already assigned to it?</p>
<p>I&#8217;m afraid the clarification doesn&#8217;t change my assessment of it. There&#8217;s still no way to tell from looking at it whether this is a class that was written for the purpose of styling an element, or a class/mixin/codechunk that was written solely for the purpose of being included in other ids/classes. And it still means that cleaning up after a development sprint will still require looking for that class/mixin/codechunk will require looking in not only the content files, but the less/css files for where it&#8217;s used.</p>
<p>@raena, What I meant was that, like using the same variable name over and over, the Less mixin syntax leaves you no way to write it without having to leave commentary or other documentation behind to explain what you&#8217;re doing (&#8221;class A is a real class, but class B here is a fake class that only exists because I want to use it as a mixin&#8221;). And code is like humor. When you *have* to explain it, it&#8217;s bad code.</p>
<p>While I think all attempts to turn CSS into a programming language are misguided (it&#8217;s a design language, it shouldn&#8217;t take a developer&#8217;s approach &#8212; object oriented inheritance, and all that &#8212; but rather a designer&#8217;s approach) Less&#8217;s mixin syntax bothers me more than others because it doesn&#8217;t even get the programming approach right. That&#8217;s the &#8220;fatal flaw&#8221; that will keep me from using Less.</p>
<p>@cloudhead makes a good point later in the post. While I can certainly empathize with @cloudhead&#8217;s view of it (I don&#8217;t use Sass, either) designers &#8220;get&#8221; picky indentation rules more easily than they &#8220;get&#8221; most standard development concepts.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: raena</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927961</link>
		<dc:creator>raena</dc:creator>
		<pubDate>Thu, 02 Jul 2009 01:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927961</guid>
		<description>@Arlen, I&#039;m utterly baffled as to how Less actually *gives you no choice* (seriously?) to write bad code. Seriously? There&#039;s NO possible way to write decent code using this?</description>
		<content:encoded><![CDATA[<p>@Arlen, I&#8217;m utterly baffled as to how Less actually *gives you no choice* (seriously?) to write bad code. Seriously? There&#8217;s NO possible way to write decent code using this?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: davidcroda</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927941</link>
		<dc:creator>davidcroda</dc:creator>
		<pubDate>Wed, 01 Jul 2009 15:12:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927941</guid>
		<description>@omnicity

Sorry I guess I&#039;m not too familiar with the way ruby works.  I was assuming you could get that information via javascript or php and then pass it to the function to generate the stylesheet and link it before the page is rendered.</description>
		<content:encoded><![CDATA[<p>@omnicity</p>
<p>Sorry I guess I&#8217;m not too familiar with the way ruby works.  I was assuming you could get that information via javascript or php and then pass it to the function to generate the stylesheet and link it before the page is rendered.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: omnicity</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927928</link>
		<dc:creator>omnicity</dc:creator>
		<pubDate>Wed, 01 Jul 2009 11:41:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927928</guid>
		<description>@Davidcroda
How do you expect a pre-processor to know how wide a users screen is?

I would love to have that in native CSS, but LESS isn&#039;t going to be able to provide it.</description>
		<content:encoded><![CDATA[<p>@Davidcroda<br />
How do you expect a pre-processor to know how wide a users screen is?</p>
<p>I would love to have that in native CSS, but LESS isn&#8217;t going to be able to provide it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: davidcroda</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927925</link>
		<dc:creator>davidcroda</dc:creator>
		<pubDate>Wed, 01 Jul 2009 10:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927925</guid>
		<description>Cool info.  Can that command be run to dynamically generate perfect stylesheets based on the users screen width?  That&#039;d be neat</description>
		<content:encoded><![CDATA[<p>Cool info.  Can that command be run to dynamically generate perfect stylesheets based on the users screen width?  That&#8217;d be neat</p>]]></content:encoded>
	</item>
	<item>
		<title>By: omnicity</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927923</link>
		<dc:creator>omnicity</dc:creator>
		<pubDate>Wed, 01 Jul 2009 09:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927923</guid>
		<description>@Wukfit 
Do you have any figures to say how much effect that has?</description>
		<content:encoded><![CDATA[<p>@Wukfit<br />
Do you have any figures to say how much effect that has?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Wukfit</title>
		<link>http://www.sitepoint.com/blogs/2009/06/30/write-better-css-with-less/comment-page-1/#comment-927917</link>
		<dc:creator>Wukfit</dc:creator>
		<pubDate>Wed, 01 Jul 2009 08:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=11726#comment-927917</guid>
		<description>This might be slightly off topic but considering all the talk of website performance and writing faster code I though I should point out that writing css rules like this:

&lt;code&gt;#banner a {...} 
#banner p {...}
#banner p a span {...}&lt;/code&gt;

will slow down a browsers rendering of the page due to how they perform css selector matches (right to left).</description>
		<content:encoded><![CDATA[<p>This might be slightly off topic but considering all the talk of website performance and writing faster code I though I should point out that writing css rules like this:</p>
<code>#banner a {...} 
#banner p {...}
#banner p a span {...}</code>
<p>will slow down a browsers rendering of the page due to how they perform css selector matches (right to left).</p>]]></content:encoded>
	</item>
</channel>
</rss>
