<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Web Designer Notebook</title>
	
	<link>http://webdesignernotebook.com</link>
	<description>Web Designer Notebook is a blog for web designers featuring topics like CSS, HTML and Wordpress, tutorials, reviews and inspiration.</description>
	<lastBuildDate>Sun, 22 Jan 2012 14:07:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WebDesignerNotebook" /><feedburner:info uri="webdesignernotebook" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Architect’s myopia</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/4H4HmTNYuUg/</link>
		<comments>http://webdesignernotebook.com/resources/architects-myopia/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 14:07:55 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1440</guid>
		<description><![CDATA[Before I get to my main point, I must mention (once again) the phenomenal quality of the hand-picked articles that are featured on the Give Me Something To Read website, the source of the piece I will be referring to in the following lines. The article &#8220;The Architect Has No Clothes&#8220;, by Michael Mehaffy and [...]]]></description>
				<content:encoded><![CDATA[<p>Before I get to my main point, I must mention (once again) the phenomenal quality of the hand-picked articles that are featured on the <a href="http://givemesomethingtoread.com/">Give Me Something To Read website</a>, the source of the piece I will be referring to in the following lines.</p>
<p>The article &#8220;<a href="http://www.guernicamag.com/blog/3176/the_architect_has_no_clothes/">The Architect Has No Clothes</a>&#8220;, by Michael Mehaffy and Nikos A. Salingaros, explores why modern architecture feels so cold and inhospitable and how that might be easily explained by a phenomenon called &#8220;architectural myopia&#8221;. The authors describe how this consequence likely has its causes in how architecture is taught and how the methodologies used in the classroom deprive future architectures from any empathy with those who will in the future live and use their creations.</p>
<p>It&#8217;s not my goal to provide a summary, as the article does a much better job at explaining this fascinating theory. But I started thinking about whether it would be fair to conclude us web designers might sometimes suffer from a similar malady. I also found it interesting that this profession I hear mentioned so many times as so established and as the ideal model to follow is, like our own, still finding its own ways.</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/4H4HmTNYuUg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/resources/architects-myopia/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/resources/architects-myopia/</feedburner:origLink></item>
		<item>
		<title>The Pastry Box Project</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/498JdtIwgm4/</link>
		<comments>http://webdesignernotebook.com/miscellaneous/the-pastry-box-project/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 13:47:58 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1433</guid>
		<description><![CDATA[I wanted to call your attention to The Pastry Box Project, which started this year on 1st January, and aims at collecting thoughts from 30 individuals that are &#8220;influential in their field&#8221;, one thought per day — I can say I&#8217;m happy to have been asked to participate (and do visit my thought&#8217;s page). After [...]]]></description>
				<content:encoded><![CDATA[<p>I wanted to call your attention to <a href="http://www.the-pastry-box-project.net/">The Pastry Box Project</a>, which started this year on 1<sup>st</sup> January, and aims at collecting thoughts from 30 individuals that are &#8220;influential in their field&#8221;, one thought per day — I can say I&#8217;m happy to have been asked to participate (and <a href="http://www.the-pastry-box-project.net/baker/inayaili-de-leon/">do visit my thought&#8217;s page</a>).</p>
<p>After a restless start to the year, I finally had time and head to sit down and read through the first few weeks of thoughts. Some are longer than others, but invariably there is something alluring about diving in so quickly and for such brief a moment into someone else&#8217;s mind.</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/498JdtIwgm4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/miscellaneous/the-pastry-box-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/miscellaneous/the-pastry-box-project/</feedburner:origLink></item>
		<item>
		<title>The Mechanical Revolution, DIBI conference (video)</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/l4d3NE32Qqc/</link>
		<comments>http://webdesignernotebook.com/events/dibi-conference-2011/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:40:29 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1422</guid>
		<description><![CDATA[Last June I gave a presentation at DIBI Web Conference, in Newcastle. For those who weren&#8217;t there, or couldn&#8217;t make it to the Design Track sessions, here&#8217;s the video.]]></description>
				<content:encoded><![CDATA[<p>Last June I gave a presentation at <a href="http://www.dibiconference.com/">DIBI Web Conference</a>, in Newcastle. For those who weren&#8217;t there, or couldn&#8217;t make it to the Design Track sessions, here&#8217;s the video.</p>
<p><span id="more-1422"></span></p>
<p><iframe src="http://player.vimeo.com/video/27487587?portrait=0" width="600" height="450" frameborder="0"></iframe></p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/l4d3NE32Qqc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/events/dibi-conference-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/events/dibi-conference-2011/</feedburner:origLink></item>
		<item>
		<title>The Wonderful calc() Function</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/lyIw9KBZfXQ/</link>
		<comments>http://webdesignernotebook.com/css/the-wonderful-calc-function/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 22:36:28 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1411</guid>
		<description><![CDATA[Sitting right at the top of my CSS wishlist was always the implementation of the calc() function. With it now being supported by not only Firefox 4 but Internet Explorer 9, I think it’s time for a quick overview on how useful calc() can be and why it would be great to see more usage [...]]]></description>
				<content:encoded><![CDATA[<p>Sitting right at the top of <a href="http://24ways.org/2010/my-css-wish-list">my CSS wishlist</a> was always the implementation of the <code>calc()</code> function. With it now being supported by not only Firefox 4 but Internet Explorer 9, I think it’s time for a quick overview on how useful <code>calc()</code> can be and why it would be great to see more usage of it.</p>
<p><span id="more-1411"></span></p>
<h3>What is calc()?</h3>
<p>The <code>calc()</code> function can be used to specify lengths. For example, you can use it for values of borders, margins, paddings, fonts, etc. Calculating widths can be extremely complicated, especially in fluid layouts; <code>calc()</code> is unique because it lets you make these calculations within the CSS itself.</p>
<p>It accepts addition (“<code>+</code>”), subtraction (“<code>-</code>“), multiplication (“<code>*</code>”) and division (“<code>/</code>“).</p>
<p>Let’s look at a simple example: </p>
<pre class="brush: css; title: ; notranslate">div {
	width: calc(100% - 20px); }</pre>
<p>Easy, right? You can also have more than one calculation within a single function, for example:</p>
<pre class="brush: css; title: ; notranslate">div {
	width: calc(100% - 20px + 2px*2); }</pre>
<p>In the current specification, it is stated that multiplication and division expressions have precedence over addition and subtraction. This means that, in the previous example, “<code>2px*2</code>” will be calculated before the other two expressions. Also, note that divisions by zero will (or should) result in an error.</p>
<p>The spec is not yet finalised (there is an <a href="http://dev.w3.org/csswg/css3-values/">Editor’s Draft version</a> that expands on the <a href="http://www.w3.org/TR/css3-values/">CSS3 Values and Units Working Draft version</a>), but these are the basics. </p>
<h3>A simple use case</h3>
<p>To show calc’s usefulness further, <a href="http://webdesignernotebook.com/examples/calc-function.html">I’ve created a basic layout</a> where I’ve applied it generously.</p>
<p>The layout consists of a main content container on the left, a sidebar on the right, and a footer, below the previous two. Here is the basic markup with only part of the text being shown, for brevity:</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;wrapper&quot;&gt;

	&lt;div id=&quot;main&quot;&gt;
		&lt;h1&gt;Far far away…&lt;/h1&gt;
		&lt;p&gt;Far far away, behind the word mountains…&lt;/p&gt;
	&lt;/div&gt;

	&lt;div id=&quot;accessory&quot;&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Far far away…&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Separated they live…&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;A small river named…&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;

	&lt;div id=&quot;footer&quot;&gt;
		Visit the article…
	&lt;/div&gt;

&lt;/div&gt;</pre>
<p>After the (hopefully) self-explanatory simple reset (please check the full CSS in the example document), font properties and defining the links, I will define the look of my <code>body</code> element:</p>
<pre class="brush: css; title: ; notranslate">body {
	background: #E8EADD;
	color: #3C323A;
	padding: 20px; }</pre>
<p>After that, I will say that the main container <code>div</code> should be full width (100%) minus 40px and aligned horizontally in the middle of the viewport:</p>
<pre class="brush: css; title: ; notranslate">.wrapper {
	width: 1024px; /* Fallback for browsers that don't support the calc() function */
	width: -moz-calc(100% - 40px);
	width: calc(100% - 40px);
	margin: auto; }</pre>
<p>In the CSS above, I have also added a fallback width for browsers that don’t support the <code>calc()</code> function, and the vendor prefix for Firefox 4.</p>
<p>Following this, I will set the borders, width and margins of the main container <code>div</code>, and I will float it left:</p>
<pre class="brush: css; title: ; notranslate">#main {
	border: 8px solid #B8C172;
	float: left;
	margin-bottom: 20px;
	margin-right: 20px;
	padding: 20px;
	width: 704px; /* Fallback for browsers that don't support the calc() function */
	width: -moz-calc(75% - 20px*2 - 8px*2);
	width: calc(75% - 20px*2 - 8px*2); }</pre>
<p>So what is happening in this <code>calc()</code> function? I am stating that I want my container <code>div</code> to be 75% wide (75% of its parent container, remember), but from these 75% I need to subtract “<code>20px*2</code>” to account for the padding on each side, and “<code>8px*2</code>” to account for the border on each side.</p>
<p>Moving onto the sidebar, I want it to occupy the remaining 25% inside the parent container, but this value will have to allow for padding, borders and the margin of the sidebar <code>div</code> (20px).</p>
<pre class="brush: css; title: ; notranslate">#accessory {
	border: 8px solid #B8C172;
	float: right;
	padding: 10px;
	width: 208px; /* Fallback for browsers that don't support the calc() function */
	width: -moz-calc(25% - 10px*2 - 8px*2 - 20px);
	width: calc(25% - 10px*2 - 8px*2 - 20px); }</pre>
<p>Deconstructing “<code>calc(25% - 10px*2 - 8px*2 - 20px)</code>”, we have the original 25%, minus “<code>10px*2</code>” to account for the padding on each side, minus “<code>8px*2</code>” to account for the border on each side, minus “<code>20px</code>” to account for the main container’s right margin.</p>
<p>The footer is simply a full width <code>div</code>, I shan’t bore everyone by explaining that.</p>
<p>Because the sidebar becomes too small after a certain point, I’ve also included a simple media query that unfloats the main and sidebar containers, and recalculates their widths so they are 100% wide minus their respective padding and border values.</p>
<pre class="brush: css; title: ; notranslate">@media screen and (max-width: 768px) {
	#main, #accessory {
		float: none; }
	#main {
		margin-right: 0;
		width: -moz-calc(100% - 20px*2 - 8px*2);
		width: calc(100% - 20px*2 - 8px*2); }
	#accessory {
		width: -moz-calc(100% - 10px*2 - 8px*2);
		width: calc(100% - 10px*2 - 8px*2); }
}</pre>
<p>This is a very simplistic use case, but hopefully it’s enough to spike your interest and prompt you to find out more about wonderful <code>calc()</code>.</p>
<h3>Browser support</h3>
<p>Calc is supported by IE 9 and Firefox 4 (which requires the <code>-moz-calc</code> vendor property). I can understand, however, how this can be a bigger problem if compared to the relatively deficient browser support of things such as animations. While animations are accessory, incorrect measurements can break a site.</p>
<p>This does not mean though that we shouldn’t be trying these out. If Firefox and IE have made the effort to implement this, and these are the browsers with the biggest market share, I would suppose the others will follow suit (I’m not sure whether WebKit or Opera are working on this or not, but do let me know if they are).</p>
<p>In my example, I’ve opted for including fallback, absolute lengths for non-comforming browsers, which gives them a non-fluid layout. This might not be acceptable in your particular case though, but it is for my use case.</p>
<h3>Reference</h3>
<p>If you’d like to know more about <code>calc()</code>, head on to the following resources:</p>
<ul>
<li><a href="http://www.w3.org/TR/css3-values/#calc">CSS3 Values and Units, W3C specification</a></li>
<li><a href="http://dev.w3.org/csswg/css3-values/#the-calc-min-and-max-functions">CSS3 Values and Units, W3C Editor&#8217;s Draft specification</a></li>
<li><a href="https://developer.mozilla.org/en/CSS/-moz-calc">-moz-calc on MDC Docs</a></li>
<li><a href="http://hacks.mozilla.org/2010/06/css3-calc/">Firefox 4: CSS3 calc() announcement on Mozilla Hacks</a></li>
</ul>
<h3>Final note</h3>
<p>Along with few other CSS3 properties, <code>calc()</code> is one of those new pieces of CSS that can truly make our lives easier. I haven’t tested it in terms of performance, so I don’t know how big an impact all these calculations might have on the browser, but I’d guess it won’t be more consequential than all those transitions and transforms that everyone seems to be so happy to indiscriminately add to their sites.</p>
<p>So, have you used <code>calc()</code> on a project? Is this something you feel is a welcome addition to CSS? I’d love to hear your thoughts.</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/lyIw9KBZfXQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/the-wonderful-calc-function/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/css/the-wonderful-calc-function/</feedburner:origLink></item>
		<item>
		<title>Stand Out From The Crowd</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/xUPL-Z_8yVA/</link>
		<comments>http://webdesignernotebook.com/work-method/stand-out-from-the-crowd/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 00:24:34 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[Work Method]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1395</guid>
		<description><![CDATA[Lately I&#8217;ve been going through lots of CV&#8217;s, as Canonical, the company I work for, is hiring a multitude of visual designers, user experience architects, front-end developers, etc. The other side Although I can&#8217;t say I have much experience interviewing and hiring people, when you&#8217;re suddenly on this side of the hiring process, some things [...]]]></description>
				<content:encoded><![CDATA[<p>Lately I&#8217;ve been going through lots of CV&#8217;s, as <a href="http://canonical.com">Canonical</a>, the company I work for, is hiring a multitude of visual designers, user experience architects, front-end developers, etc.</p>
<p><span id="more-1395"></span></p>
<h3>The other side</h3>
<p>Although I can&#8217;t say I have much experience interviewing and hiring people, when you&#8217;re suddenly on this side of the hiring process, some things become clear, mainly on how people could easily make their CV&#8217;s stand out from everyone else&#8217;s.</p>
<h3>Your 15 minutes of fame</h3>
<p>We&#8217;re busy all the time, so even though we make our best effort to make sure we only hire the best people, looking at applicants&#8217; emails, agency referrals, CV&#8217;s, portfolios, takes a lot of time. So the first thing you should keep in mind is that people are busy. They want to see your work and capabilities straight away. Try to make that as clear a process as you can.</p>
<h3>Emails and cover letters</h3>
<p>Friendly but professional. We&#8217;re talking about web roles here, you&#8217;re not applying for a job as a lawyer or an accountant. A friendly, polite, clear, concise—and professional—email about you, your skills and why you&#8217;re interested in the job go a long way.</p>
<h3>The CV</h3>
<p>Some people say CV&#8217;s don&#8217;t matter, especially for a web designer. I disagree. I&#8217;d rather follow links to your most important work from a CV than trying to figure out how the navigation on your site works.</p>
<p>Details on what your role was on each project are highly useful—if you&#8217;re called in for an interview, you&#8217;ll be asked that anyway.</p>
<p>Try to make the CV as short as possible, but let it be representative of your career so far and/or your accomplishments.</p>
<p>I would recommend you don&#8217;t forget to mention the following:</p>
<ul>
<li>Name, contact (email, city, phone number)</li>
<li>Short blurb summarising your competences and what you&#8217;re looking for in a job</li>
<li>Link to online portfolio (if you have one…)</li>
<li>Perhaps a LinkedIn profile link (for example, you may have recommendations there)</li>
<li>Education info (I don&#8217;t need to see your primary school though)</li>
<li>Your skills (use known keywords here, and point out whether you&#8217;re an expert at something or only know it at a basic level), languages you speak, etc.</li>
<li>Employment history with description for each role, links to projects you were involved in (make this relevant to the position you&#8217;re applying to)</li>
<li>Published work, or link to your blog</li>
<li>Other accomplishments such as any relevant awards, or speaking you&#8217;ve done</li>
</ul>
<p>If you want to you can add references or recommendations, although not necessary and this may make your CV too long.</p>
<p>Links are indispensable if the sites are online somewhere (even if just as a screen grab on a portfolio site).</p>
<h3>Review</h3>
<p>When making your CV, ask someone else to review it for you. If you can find someone with more experience than you (someone who&#8217;s used to looking at CV&#8217;s would be perfect), and that knows your skills, so they can remind you of any skills you might have forgotten to mention, or tell you you don&#8217;t really have a particular skill you mentioned.</p>
<p>If you&#8217;re applying in a language other than your own, ask someone who speaks the language to proofread it.</p>
<p>The last time I revamped my CV, I asked a couple of people to look at it, with different backgrounds, but from the industry, and some native English speakers. Their recommendations were invaluable and made my CV ten times better.</p>
<h3>Writing and personal projects</h3>
<p>Having a personal blog where you express your thoughts and ideas about what you do always gives a good impression (exceptions aside). Writing shows you are capable of expressing yourself, and writing about your work shows a level of commitment and engagement with what you do that is invaluable and usually a synonym of someone who is willing to learn and also willing to share—indispensable attributes for working in a team.</p>
<p>This is especially important if you are a developer, with no visual work to show on a portfolio site. I still don&#8217;t know which is the best way for a developer to showcase their work other than in a show &#038; tell/writing scenario. Ideas are welcome, feel free to use the comment form.</p>
<p>A blog is a personal project, but other types of personal explorations are always a plus (apps you&#8217;ve made, research, experiments, etc.).</p>
<h3>Your skills</h3>
<p>By showing you&#8217;re interested and engaged (I don&#8217;t think you can be in this industry if you dread it—it&#8217;s a labour of love), that you can communicate with others, and that you are willing to learn, you will be one step ahead of most people.</p>
<p>If the person or team recruiting notice this, they might be open to take you in as a junior who can progress, who they can mentor and help advance in their career—even when the original idea was to hire someone for a more senior position.</p>
<h3>Where are the good ones?</h3>
<p>It&#8217;s extremely hard to hire good people, especially for full time positions. If you&#8217;re good and you know it, and your skills are relevant, you&#8217;ll probably get more offers than you need, even if you already have a job or are freelancing.<br />
So what I&#8217;d like to ask, besides asking for tips on how to create a good first impression when looking for work, is <strong>where would you go to find the good ones?</strong> And how can you make sure that they&#8217;ll want to work with (or for) you?</p>
<p><em>Note: I know I&#8217;ve focussed mostly on the CV and writing/personal projects part of the story. I could have mentioned actual portfolios, or interviews, or even the importance of expanding your network (people are more likely to interview someone they know or that someone has recommended), but this post is already long as it is, and I&#8217;m not in the mood for <a href="http://twitter.com/yaili/status/35089941046235136">writing another book right now</a>.</em></p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/xUPL-Z_8yVA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/work-method/stand-out-from-the-crowd/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/work-method/stand-out-from-the-crowd/</feedburner:origLink></item>
		<item>
		<title>Are CSS Frameworks Evil?</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/26fxpYxAvrc/</link>
		<comments>http://webdesignernotebook.com/css/are-css-frameworks-evil/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 21:48:17 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1361</guid>
		<description><![CDATA[CSS frameworks have a tendency to be dismissed by many CSS authors; code bloat and non-semantic class names are usually at the top of the list of reasons why. Even without ever using one, I shared the same opinion, but that might have changed after trying a few of them out while doing some research [...]]]></description>
				<content:encoded><![CDATA[<p>CSS frameworks have a tendency to be dismissed by many CSS authors; code bloat and non-semantic class names are usually at the top of the list of reasons why. Even without ever using one, I shared the same opinion, but that might have changed after trying a few of them out while doing some research recently…</p>
<p><span id="more-1361"></span></p>
<h3>Existing frameworks</h3>
<p>There&#8217;s an abundance of CSS frameworks out there, from the simpler ones that only provide layout solutions to ones that include forms, typography and fluid layout modules.</p>
<p>From what I can tell, designers and agencies that work with frameworks on a regular basis tend to use either <a href="http://www.blueprintcss.org/"><strong>Blueprint CSS</strong></a> or <a href="http://960.gs/"><strong>960 Grid System</strong></a> (often abbreviated to 960gs). <a href="http://developer.yahoo.com/yui/3/cssgrids/"><strong>Yahoo!&#8217;s YUI Grids</strong></a> is also a popular one. These were the three frameworks I experimented with.</p>
<h3>Preconceptions</h3>
<p>I had frameworks all figured out: they were for CSS authors who wanted to go with the easy solution and not create their own CSS foundations, or for those who didn&#8217;t really want to understand how CSS works — basically, anyone looking for an <strong>easy solution</strong>.</p>
<p>If there is one thing I dislike it is purists who aren&#8217;t open to other people&#8217;s ideas and that never change their minds. I love CSS and I can be a purist in some cases, but I also understand that <strong>not everything can be perfect</strong> and sometimes stylesheets are messy. We all aspire to create beautiful, clean code, that is semantic and valid, but when working on real projects, that keep being updated, where more than one person at different times edits the CSS, each one with their interpretation of &#8216;perfect&#8217; and with their own different level of expertise and experience, <strong>efficiency usually takes precedence</strong> over the purity of the code.</p>
<p>But I digress. What I mean to say is that sometimes we can use the odd non-semantic class name and no puppies will die. This is what frameworks are often criticised for. Class names like &#8216;<code>grid_16</code>&#8216; or &#8216;<code>span-8</code>&#8216; are far from being ideal, but given the need for being adaptable to any kind of project, they make sense (in most cases at least).</p>
<p>These non-semantic class names can be paired with better ID names (like &#8216;<code>class="span-8" id="aside"</code>&#8216;) or, when using HTML5, with semantic element names.</p>
<p>While I was trying these frameworks out, I asked a few questions on Twitter (mainly complaints, to be fair), and, even though this is not scientific, most people seemed to <strong>reprove the use of frameworks</strong>. I seem to remember someone even saying they are ‘useless’, and many more negative comments. Two or three people said they used them though, and were very happy about that (opinions diverged on which one).</p>
<h3>Wireframing</h3>
<p>I always had the idea that frameworks would be quite useful to create wireframes on the browser, so that was what I decided to replicate with Blueprint, 960gs and YUI 3 Grids, using a <em>very</em> simple layout.</p>
<h4>Blueprint</h4>
<p>The Blueprint CSS framework was created by <a href="http://bjorkoy.com/">Olav Bjørkøy</a> and released in August 2007. It is usually considered to be the most comprehensive CSS framework, since it caters not only for grid-based layout creation but provides, and has, a <strong>solid typographic foundation</strong>, considering aspects like vertical rhythm. It also provides a reset and print stylesheet, and basic styling for forms.</p>
<p><a href="http://www.blueprintcss.org/"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-1-blueprint.jpg" alt="" title="Blueprint CSS homepage" width="500" height="472" class="alignnone size-full wp-image-1368" /></a></p>
<p>The framework uses by default a 24-column layout (each column spans 30 pixels and has a right margin of 10 pixels) but you can create different layouts by using the compressor included in the files.</p>
<p>Using Blueprint is as easy as including a wrapper with a class of “<code>container</code>” surrounding the remaining blocks on the page. Depending on the width of each of the internal containers, you need to use a class of, for example, “<code>span-24</code>”, for a div that spans across the entire width of the page, or “<code>span-8</code>”, for a block that spans across 8. If the container is the last one within a particular container or column, it should also include a class of “<code>last</code>”. The HTML for a the layout above would look like this (I have omitted the content, of course):</p>
<pre class="brush: xml; title: ; notranslate">&lt;body&gt;
	&lt;div class=&quot;container&quot;&gt;
	
		&lt;div class=&quot;span-24 b&quot;&gt;
		&lt;/div&gt;
		
		&lt;div class=&quot;span-6 b&quot;&gt;
		&lt;/div&gt;
		
		&lt;div class=&quot;span-18 last&quot;&gt;
		
			&lt;div class=&quot;span-15&quot;&gt;
		
				&lt;div class=&quot;span-15 last b&quot;&gt;
				&lt;/div&gt;
				
				&lt;div class=&quot;span-9 b&quot;&gt;
				&lt;/div&gt;
				
				&lt;div class=&quot;span-6 last b&quot;&gt;
				&lt;/div&gt;
				
			&lt;/div&gt;
			
			&lt;div class=&quot;span-3 last&quot;&gt;
			&lt;/div&gt;
			
			&lt;div class=&quot;span-18 last b&quot;&gt;
			&lt;/div&gt;
		
		&lt;/div&gt;
	
	&lt;/div&gt;
&lt;/body&gt;</pre>
<p>I’ve also added a class “<code>b</code>” (pardon the presentational name) to the <code>div</code>s that have content so that I could add a light background and some bottom margin to preview the wireframe better (we’re just doing a quick example here, so it’s OK to include this directly in the head):</p>
<pre class="brush: css; title: ; notranslate">.b { background:#d4d4d4; margin-bottom:10px; }</pre>
<p>Here’s a screenshot of the completed wireframe:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-2-wireblueprint.jpg" alt="" title="Simple wireframe made with Blueprint CSS" width="500" height="346" class="alignnone size-full wp-image-1369" /></p>
<p>This took me <strong>less than 10 minutes</strong> to make (I know it’s pretty basic though), including having a quick read through the Getting Started guides.</p>
<h4>960gs</h4>
<p>The 960 Grid System CSS framework was developed by <a href="http://sonspring.com/">Nathan Smith</a> and was released in March 2008. This framework was developed with a strong <strong>focus on the grid</strong>; even though it provides basic typographic styles, its main purpose is to  deliver a cross-browser foundation (it has full A-Grade browser support, <a href="http://developer.yahoo.com/yui/articles/gbs/">as defined by Yahoo!</a>) that allows for many variations of the most common grid-based layouts.</p>
<p><a href="http://960.gs"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-3-906gs.jpg" alt="" title="906 Grid System homepage" width="500" height="472" class="alignnone size-full wp-image-1370" /></a></p>
<p>For 960gs I’m going with an even simpler layout — the main idea here is to show the differences between class naming and nesting from framework to framework.</p>
<p>The framework works, by default, on either a 12 or 16 column grid. We need to add a container surrounding the inner blocks with a class of “<code>container_16</code>” (or “<code>container_12</code>”); the inner containers should have classes of “<code>grid_16</code>”, “<code>grid_14</code>”, etc., depending on how many columns they span. Here is the final HTML markup for our simple layout:</p>
<pre class="brush: xml; title: ; notranslate">&lt;body&gt;
	&lt;div class=&quot;container_16&quot;&gt;
		&lt;div class=&quot;grid_16 b&quot;&gt;
			Header
		&lt;/div&gt;
		&lt;div class=&quot;grid_4 b&quot;&gt;
			Sidebar
		&lt;/div&gt;
		&lt;div class=&quot;grid_12 b&quot;&gt;
			Main content
		&lt;/div&gt;
		&lt;div class=&quot;grid_16 b&quot;&gt;
			Footer
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;</pre>
<p>And this what you should see:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-4-wire960gs.jpg" alt="" title="Wireframe created with the 960 Grid System framework" width="500" height="346" class="alignnone size-full wp-image-1371" /></p>
<p>As with Blueprint, there are several tools online that allow you to configure the framework to your needs. <a href="http://www.designinfluences.com/fluid960gs/"><strong>Fluid 960 Grid System</strong></a> is based on the original 960 Grid System, but allows for fluid and fixed layouts, and includes basic styling for elements such as navigation, tables, forms, articles and typography.</p>
<h4>YUI 3 Grids</h4>
<p>The YUI 3 Grids framework is part of the Yahoo! User Interface Library (YUI). The library includes JavaScript resources as well as CSS (YUI 3 CSS also incorporates reset and typography stylesheets). It works in a similar way to the other frameworks presented in this chapter, with a difference: there is <strong>no predefined width</strong> for the main container, only predefined “units” in which a container can expand within another container.</p>
<p><a href="http://developer.yahoo.com/yui/3/cssgrids/"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-5-yui.jpg" alt="" title="YUI 3 Grids web page" width="500" height="472" class="alignnone size-full wp-image-1372" /></a></p>
<p>In this case, we need to add the desired width to the <code>body</code> element of our page, as such:</p>
<pre class="brush: css; title: ; notranslate">body {
  	 margin: auto;
  	 width: 960px;	
}</pre>
<p>The “<code>margin: auto</code>” property will centre our content on the page. Next, as with the other frameworks, we need to include a wrapper container with the class “<code>yui3-g</code>”. The containers within it will take class names based on the percentage of the width they should fill (or “units”). So, for example, if the sidebar takes up one third of the total width, it should have a class of “<code>yui3-u-1-3</code>”, and if the main content area takes up two thirds of the total width, it should have a class of “<code>yui3-u-2-3</code>”. YUI comes with a set of predefined unit classes (which are listed in the framework’s website).</p>
<p>The final example would have the following HTML:</p>
<pre class="brush: xml; title: ; notranslate">&lt;body&gt;
	&lt;div class=&quot;yui3-g&quot;&gt;
		&lt;div class=&quot;yui3-u-1 b&quot;&gt;
			Header
		&lt;/div&gt;
		&lt;div class=&quot;yui3-u-1-3 b&quot;&gt;
			Sidebar
		&lt;/div&gt;
		&lt;div class=&quot;yui3-u-2-3 b&quot;&gt;
			Main content
		&lt;/div&gt;		
		&lt;div class=&quot;yui3-u-1 b&quot;&gt;
			Footer
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;</pre>
<p>Looking like this:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-6-wireyui.jpg" alt="" title="Simple wireframe created with YUI 3 Grids" width="500" height="346" class="alignnone size-full wp-image-1373" /></p>
<p>Notice that YUI doesn’t have gutters between the columns — I see that as a downside.</p>
<h3>My favourite</h3>
<p>For me there&#8217;s a clear winner and it&#8217;s <strong>Blueprint</strong>. The guide was clear, it provides lots of tutorials and examples from within the front page of the website, and the fact that it provides a good typographic foundation is a major advantage.</p>
<p>Another advantage of Blueprint is the community behind it, which is constantly creating and releasing new plugins, themes and other tools that can be used in conjunction with the basic framework.</p>
<p>I felt <strong>960gs</strong>&#8216;s logic a lot harder to understand; it took me more than 30 minutes to figure out how the framework worked and finish the layout. If I&#8217;m going to use a framework I will be doing it to save time, so I didn&#8217;t find that experience very nice. Also, contrary to Blueprint&#8217;s website, 960gs&#8217;s didn&#8217;t have a clear &#8216;getting started&#8217; tutorial, so I had to look for articles outside of the site to &#8216;get started&#8217;. I do like the Fluid 960gs framework, but I&#8217;m not sure if there isn&#8217;t something similar for Blueprint.</p>
<p>Most people that I’ve talked to while doing this little experiment mentioned that they didn’t really appreciate frameworks, but the ones who did, swore by 960gs, so it might have been that I just wasn’t introduced to it the right (or simpler) way. There are beautiful websites built on top of this framework (a quick look at its website is enough proof), like the gorgeous Black Estate Vineyard:</p>
<p><a href="http://blackestate.co.nz/"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/09/image-7-blackestate.jpg" alt="" title="Black Estate Vineyard website" width="500" height="613" class="alignnone size-full wp-image-1374" /></a></p>
<p>The fact that <strong>YUI</strong> is adaptable to any width is a major plus, but the reduced amount of unit combinations made it a little uncomfortable to use, and I felt somewhat restricted as to what I could do with my layouts. If this is incorrect, I&#8217;d love it if someone would let me know, I couldn&#8217;t find a way around it easily in the getting started guide.</p>
<h3>Conclusion</h3>
<p>I&#8217;ve mentioned above that I believed CSS frameworks to be &#8216;the easy solution&#8217;. I still think that&#8217;s true, but I don&#8217;t see it as a bad thing: why spend hours creating perfectly hand-crafted CSS layouts when there are excellent foundations that we can build upon already out there? Life&#8217;s not just about coding (really) and there are better things that I can be doing with my time than creating problems for which there are solutions already.</p>
<p>This doesn&#8217;t mean, however, that I believe everyone should be using existing frameworks in their projects. Ideally, you&#8217;d be working with <strong>your own framework</strong> or template, adapted to your needs. It just means that I don&#8217;t think CSS frameworks should be treated like a bad thing and they can definitely be useful in some cases, or even as a base or inspiration for creating a custom framework. And I will certainly not condemn any designer or agency that uses out-of-the-box solutions, like Blueprint, because the benefits that you get from using those can surpass the downsides like verbose stylesheets and non semantic class names.</p>
<p>Don’t get me wrong: I thrive on a good piece of semantic HTML and CSS, and like most of you I also wanted to throw up the first time I looked at the non-semantic classes that these frameworks use. I will look at you sideways if your navigation is a paragraph rather than a list and I may unfollow you on Twitter if I know you’ve ever used class names like “<code>redLink</code>”. I still believe that the non-semantic class names are the <strong>least desirable feature</strong> of frameworks; ideally we shouldn&#8217;t have classes like that in our stylesheets, but I also think there are times when we need to be flexible and adapt ourselves and accept that things like this will happen.</p>
<p>Maybe they are a good solution for quick or <strong>low budget projects</strong>, or prototypes (although prototype code will often move on to production, so beware if you’re especially lazy, like me). I just thought this would be a good topic to discuss, and I guess I don’t mind saying that <a href="http://webdesignernotebook.com/tools/in-dreamweavers-defense/">I like stuff people usually get repulsed by</a>, so here.</p>
<p>My verdict: no, frameworks are <em>not</em> evil.</p>
<p>So my question is, have you ever used a framework? Do you agree that they are a great tool, or have I gone crazy? I&#8217;d love to hear your thoughts.</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/26fxpYxAvrc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/are-css-frameworks-evil/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/css/are-css-frameworks-evil/</feedburner:origLink></item>
		<item>
		<title>My thoughts on LESS</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/UyjiyIUrbEk/</link>
		<comments>http://webdesignernotebook.com/css/my-thoughts-on-less/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 00:10:36 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1327</guid>
		<description><![CDATA[I’ve started using LESS a few months ago on a few projects. LESS allows you to extend the way you write CSS, letting you use variables, nested selectors, operations and mixins. It sounds great — and it is great — but there are a few things that can make it work against you. These are [...]]]></description>
				<content:encoded><![CDATA[<p>I’ve started using <a href="http://lesscss.org/">LESS</a> a few months ago on a few projects. LESS allows you to extend the way you write CSS, letting you use variables, nested selectors, operations and mixins. It sounds great — and it <em>is</em> great — but there are a few things that can make it work against you. These are some of my thoughts on LESS.</p>
<p><span id="more-1327"></span></p>
<h3>What is LESS?</h3>
<p>LESS — Leaner CSS — is, in the <a href="http://www.usabilitypost.com/2009/06/16/introducing-less-a-better-css/">authors&#8217; own words</a>, a “<strong>new version of CSS</strong>” (better yet, of writing CSS), that is then compiled into “traditional” CSS using the LESS compiler.</p>
<p>There are 4 main things you can do with LESS that you can’t with normal CSS:</p>
<h4>1. Variables</h4>
<p>You can define a variable, such as “<code>@text-color</code>”, and use it throughout your stylesheet. If the colour of your text changes, you only need to change it once in your CSS — where the variable is initially defined.</p>
<h4>2. Nested selectors</h4>
<p>With nested selectors, instead of doing this and repeating yourself:</p>
<pre class="brush: css; title: ; notranslate">aside h1 { font-size: 24px; }
aside h2 { font-size: 18px; }</pre>
<p>You can have:</p>
<pre class="brush: css; title: ; notranslate">aside {
	h1 { font-size: 24px; }
	h2 { font-size: 18px; }
}</pre>
<h4>3. Operations</h4>
<p>You can add, subtract, divide and multiply using operations. Here’s a quick example:</p>
<pre class="brush: css; title: ; notranslate">@wrappers: 600px;

aside {
    width: @wrappers / 2;
}</pre>
<p>This is definitely not the best example, but it should be enough for you to get the point.</p>
<h4>4. Mixins</h4>
<p>Mixins work a lot like variables, but you can specify a whole class in one. For example:</p>
<pre class="brush: css; title: ; notranslate">.b-radius {
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
}

.box {
	.b-radius;
}</pre>
<p>From these examples, I suppose you can say that <em>LESS is actually more</em>. (I’m sorry, I couldn’t help myself.)</p>
<h3>This is not a &#8220;how to&#8221; guide</h3>
<p>The <a href="http://lesscss.org/docs">official LESS documentation</a> is very clear on how to install it. I have to admit I usually stop reading instructions whenever &#8220;Terminal&#8221; is mentioned (and I know more people do), but I guess most CSS authors will be OK with it — if not, ask for help to your nearest web dev (or email me and I’ll give you the phone number of one).</p>
<p>After it’s installed, you’ll have <strong>two files</strong>: the .less file — this is the file you&#8217;ll be working with — and the compiled .css file.</p>
<p>There&#8217;s also <a href="http://incident57.com/less/">LESS app</a>, that makes it easier to use LESS. And I suppose that some CMS and servers let you use LESS directly, but the point of this article is not to teach anyone how to install it — it&#8217;s to go through its good and bad points.</p>
<p>On to the important bit…</p>
<h3>How LESS can make your life easier</h3>
<p>This is a list of things that, in my opinion, <strong>make LESS worthwhile</strong> and can really simplify your CSS. These are the things that I usually miss the most when I’m not working on LESS files.</p>
<h4>1. Variables</h4>
<p>Surely when you are writing your CSS there are colours, measurements, etc. that you <strong>keep using over and over</strong>. For example, let&#8217;s say your brand colour is jade (very fashionable for Spring/Summer 2010). You may use it on various elements in your design, for example, the main text:</p>
<pre class="brush: css; title: ; notranslate">body {
    …
    color: #77b59d;
    …
}</pre>
<p>Or the borders of your posts:</p>
<pre class="brush: css; title: ; notranslate">article {
    …
    border-bottom: 1px solid #77b59d;
    …
}</pre>
<p>Or as the background of your footer:</p>
<pre class="brush: css; title: ; notranslate">footer {
    …
    background-color: #77b59d;
    …
}</pre>
<p>If someone has to edit the CSS file and doesn&#8217;t know exactly which colour he or she is supposed to be using — it may even be you a few months later —, what happens is that either you&#8217;ll spend some time scanning through the document until you find the colour, you&#8217;ll use Firebug or, if you like to complicate things, use xScope or take a screenshot and use Photoshop to detect the colour.</p>
<p>This is silly. You&#8217;ll end up with many similar colours instead of just one. (As a note, Dreamweaver lists all the colours that a site is using — you&#8217;d be surprised at how inconsistent some CSS authors can be when applying colour.)</p>
<p>Another thing that may happen is when you actually want to change this colour throughout your stylesheet: <strong>you&#8217;ll have to edit every instance of it</strong> — that&#8217;s painful.</p>
<p>With a variable, you can have this:</p>
<pre class="brush: css; title: ; notranslate">@main-color: #77b59d;

body {
    …
    color: @main-color;
    …
}

article {
    …
    border-bottom: 1px solid @main-color;
    …
}

footer {
    …
    background-color: @main-color;
    …
}</pre>
<p>Beware though: you can easily <strong>go overboard with variables</strong>. I have to confess I was inebriated in the beginning by the thought of never having to declare a colour, a padding value, etc. again, and started adding too many variables to my LESS files. It gets messy and complicated quickly. You&#8217;ll have to <strong>find a balance</strong>.</p>
<h4>2. Accessors</h4>
<p>If you only need to <strong>access something once</strong>, you probably don’t need a variable. If you&#8217;re pretty sure that that thing you need to access is, and will always be, directly linked to whichever thing you&#8217;re linking it to, you can use an accessor.</p>
<p>Let&#8217;s say you have a block with a heading and some text. You want the border of that box to always be the same colour as the heading. You can have this:</p>
<pre class="brush: css; title: ; notranslate">#sales {
    border-color: #ae7b2a;
}

#sales h2 {
    color: #sales['border-color']; 
}</pre>
<p>Using accessors may be going a step too far in some cases, but in other cases it makes a lot of sense — I think they&#8217;re quite useful.</p>
<h4>3. Mixins</h4>
<p>One example: gradients. Let’s face it, they are <strong>an absolute pain to write</strong>. Take a look at how LESS makes it easier for you:</p>
<p>The mixin:</p>
<pre class="brush: css; title: ; notranslate">.grad-linear (@start:&quot;&quot;, @end:&quot;&quot;) {
    background: -webkit-gradient(linear, left top, left bottom, from(@start), to(@end));
    background: -moz-linear-gradient(-90deg,@start,@end);
}</pre>
<p>Using the mixin in your .less file:</p>
<pre class="brush: css; title: ; notranslate">nav {
	.grad-linear(#b3cdcc,#718a89);
}</pre>
<p>What your compiled .css file will show:</p>
<pre class="brush: css; title: ; notranslate">nav {
	background: -webkit-gradient(linear, left top, left bottom, from(#b3cdcc), to(#718a89));
	background: -moz-linear-gradient(-90deg, #b3cdcc, #718a89);
}</pre>
<p>Mixins are great for properties that still require that we add some vendor-specific code (like <code>border-radius</code>) or for the latest CSS3 gradients, transitions, etc.</p>
<p>I have to say mixins, especially when used for gradients and <code>border-radius</code>, are my favourite part of LESS.</p>
<h4>4. C-style comments</h4>
<p>Some people prefer these to typical CSS inline comments. I&#8217;m OK with either, but if you&#8217;re using LESS, you can have either this:</p>
<pre class="brush: css; title: ; notranslate">/* A normal CSS comment */</pre>
<p>Or this:</p>
<pre class="brush: css; title: ; notranslate">// A C-style CSS comment</pre>
<h4>5. Nesting (in some cases)</h4>
<p>Nesting is one of those things that makes you think LESS is amazing at first. Then you start using LESS and start nesting selectors, and change your mind.</p>
<p>The rare instance where I think nesting is useful is with link states in simple selectors. In LESS you can have this:</p>
<pre class="brush: css; title: ; notranslate">a {
    :link, :visited { text-decoration:none; color:#edd273; font-weight:bold; }
    :hover, :active, :focus { color:#edd273; border-bottom:1px solid #edd273; }
}</pre>
<p>And the output will be this:</p>
<pre class="brush: css; title: ; notranslate">a:link {
  text-decoration: none;
  color: #edd273;
  font-weight: bold;
}
a:visited {
  text-decoration: none;
  color: #edd273;
  font-weight: bold;
}
a:hover {
  color: #edd273;
  border-bottom: 1px solid #edd273;
}
a:active {
  color: #edd273;
  border-bottom: 1px solid #edd273;
}
a:focus {
  color: #edd273;
  border-bottom: 1px solid #edd273;
}</pre>
<p>There&#8217;s a lot of repetition in here, I know (I&#8217;ll mention that on the next section), but it&#8217;s nice nonetheless.</p>
<h3>How LESS can easily become a nightmare</h3>
<p>This is a list of things that I would either <strong>avoid</strong> doing in LESS or that just <strong>don’t work</strong> the way you’d expect them to (so, annoyances).</p>
<h4>1. Nesting (in most cases)</h4>
<p>As I just mentioned in the previous section, nesting looks nice at first, but it doesn&#8217;t work flawlessly.</p>
<p>One of the things that I&#8217;ve noticed for example, is that, even though you can have this: </p>
<pre class="brush: css; title: ; notranslate">nav {
  ul {
    li a {
      :link { color: red; }
    }
  }
}</pre>
<p>This won&#8217;t work (notice that now I&#8217;m using a direct child selector instead):</p>
<pre class="brush: css; title: ; notranslate">nav {
  ul {
    li &gt; a {
      :link { color: red; }
    }
  }
}</pre>
<p>For this last bit of CSS to work, you&#8217;ll have to do it like this (notice the extra &#8220;&amp;&#8221;):</p>
<pre class="brush: css; title: ; notranslate">nav {
  ul {
    li &gt; a {
      &amp;:link { color: red; }
    }
  }
}</pre>
<p>This not a problem with LESS, I guess it&#8217;s just not a very intuitive way of doing it just for using a different type of selector.</p>
<p>The main thing, however, that I think makes nesting a poor choice in most cases, is how it can make <strong>a mess out of specificity</strong> [here's <a href="http://www.smashingmagazine.com/2010/04/07/css-specificity-and-inheritance/">a post I've written previously on specificity</a> and other matters].</p>
<p>Your first instinct is to nest everything inside the main blocks, like <code>aside</code>, <code>#sidebar</code>, <code>#news</code>, etc. But then you realise you need to reutilise a piece of the CSS for another area on the site. You make another nested selector for that new block, because you don&#8217;t want to go over that first nested block of CSS that you created in the first place. You&#8217;ll be left out with numerous <strong>redundant selectors</strong>, with <strong>very long selectors</strong> (because you don&#8217;t notice this until the compiler phase), and with the need to create <strong>overly specific selectors</strong> to override your initial ones (that shouldn&#8217;t have been so specific to begin with).</p>
<p>Nesting selectors is one of those cases where the phrase &#8220;<em>with great power comes great responsibility</em>&#8221; makes a lot of sense. Use it wisely and carefully.</p>
<h4>2. Changes made to the compiled file</h4>
<p>This isn&#8217;t a problem with LESS per se, but rather with your <strong>working process</strong>.</p>
<p>Even if you are the only person in charge of the CSS on a given project, it&#8217;s possible that someday you will leave, or hand the project over to someone else, so it&#8217;s a good thing to make sure that no-one is going to edit the compiled .css file directly instead of the .less one.</p>
<p>If this happens, and then after a while someone <em>does</em> use the .less file, when it compiles, it will <strong>override the changes made</strong> to the .css file. Then you&#8217;ll have to go back and fix it.</p>
<p>This is just a general problem with people: if there&#8217;s a chance that we can make a mistake, we will make it.</p>
<h4>3. Formatting</h4>
<p>The .css file that results from the compiler gives you back your CSS with no comments and single-line declarations (that have more than one property). It would be useful if you could have some control over this. For example, you may want to minify the CSS (although you could argue that this should be a completely separate step), keep comments in, have multi-line CSS, group selectors, etc.</p>
<p>I&#8217;m not entirely sure if this has been resolved, so if someone knows better, do let me know.</p>
<h4>4. Using Firebug</h4>
<p>I can&#8217;t work without Firebug, and one of the best things about it is knowing exactly which line you&#8217;re looking at. If you&#8217;re using LESS, that&#8217;s broken: Firebug <strong>shows you the line of the compiled .css file</strong>, not the original .less file you&#8217;re editing, which is basically useless.</p>
<h3>Conclusion</h3>
<p>I love LESS and I think it&#8217;s <strong>a pleasure to use</strong>, until you start trying to be too clever and things start getting messy. My advice is to use it with care, take advantage of its niceties but don&#8217;t go overboard.</p>
<p>I know there are lot <a href="https://less.tenderapp.com/discussions/problems">more problems</a> (and probably good things too) that I haven’t referred. These are the ones that I’ve <strong>personally</strong> came across with; I try not to use LESS on larger projects and I usually don&#8217;t use <code>@import</code> on my stylesheets (especially smaller projects) — which I know can cause some problems.</p>
<p>I’d love to know what your thoughts are on this: have you used it? Why, or why not? Which problems have you encountered? Do you find it helpful or just plain silly?</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/UyjiyIUrbEk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/my-thoughts-on-less/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/css/my-thoughts-on-less/</feedburner:origLink></item>
		<item>
		<title>Books: “HTML and CSS Web Standards Solutions”</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/ADe6TE0xCAs/</link>
		<comments>http://webdesignernotebook.com/reviews/web-standardistas/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 19:15:04 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Project 52]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1308</guid>
		<description><![CDATA[The second book I&#8217;m reviewing is &#8220;HTML and CSS Web Standards Solutions&#8221;, by web standardistas Christopher Murphy and Nicklas Persson. What is the book about? The book provides the reader with a foundation in how to markup and style a web site — the right way. In the authors&#8217; own words this book is &#8220;a [...]]]></description>
				<content:encoded><![CDATA[<p>The second book I&#8217;m reviewing is <a href="http://www.amazon.com/HTML-CSS-Standards-Solutions-Standardistas/dp/1430216069/">&#8220;HTML and CSS Web Standards Solutions&#8221;</a>, by web standardistas Christopher Murphy and Nicklas Persson.</p>
<p><span id="more-1308"></span></p>
<h3>What is the book about?</h3>
<p>The book provides the reader with a <strong>foundation</strong> in how to markup and style a web site — the right way. In the authors&#8217; own words this book is &#8220;a well-grounded, web standards-based approach <strong>in one package</strong>&#8220;.</p>
<p>Starting from the beginning, it explains the <strong>importance of solid, structured markup</strong> and of analysing a web site&#8217;s content before diving into the coding phase. It introduces the most important HTML tags and how to properly use them.</p>
<p>Following the HTML section of the book — which takes almost half of it — it dives into the CSS bit. Here it explains <strong>how to use CSS in a clean and effective way</strong> — just the way I like it :)</p>
<p>One of the most important aspects of this book is how it encourages the reader to <strong>continue to learn and explore</strong> — there is a very clear message that you can&#8217;t possibly learn everything from one book. It provides several paths in which the reader can further his or her knowledge and <strong>evolve</strong> as a web designer.</p>
<h3>Who is the book for?</h3>
<p>As I&#8217;ve mentioned above, the book is targeted at beginners — <strong>it doesn&#8217;t assume you know anything</strong> about HTML or CSS so everything is explained in a very clear and practical way.</p>
<p>I suppose it&#8217;s hard to assess whether the information would be easy to understand by an absolute beginner since I&#8217;m not one anymore (or at least I like to think I&#8217;m not). But every step of the book is so carefully explained, that I doubt anyone would have any problems.</p>
<p>Like Sam Brown mentioned in the title of his review, <a href="http://sam.brown.tc/entry/419/web-designers-who-can-t-code-need-to-read-this-book">&#8220;Web designers who can&#8217;t code, need to read this book&#8221;</a>. I couldn&#8217;t agree more.</p>
<h3>A minor remark</h3>
<p>The only thing I would have changed, or better yet, added to the book would be a <strong>more detailed section on inheritance</strong>. This is, however, probably due to the fact that I just wrote <a href="http://www.smashingmagazine.com/2010/04/07/css-specificity-and-inheritance/">a massive post about it</a> and all that information is fresh in my memory.</p>
<p>Inheritance is a fairly complicated topic and would probably not be relevant for this book; it&#8217;s one of the things that people can easily research on their own when any issues arise.</p>
<h3>Conclusion</h3>
<p>Reading this book felt like I was at the web design school I never had the change to attend. It is truly <strong>a course in a book</strong>: it explains the basics that every web designer should know — whether a coder or not.</p>
<p>The completed website that it provides the reader with at the end is invaluable, and I am not ashamed to admit that, even though I&#8217;m not within the book&#8217;s target audience, I&#8217;ve learned a few things I didn&#8217;t know, and remembered others I had forgotten.</p>
<p>I am lucky enough to know Christopher and Nicklas, the authors of this book, personally, and it was a pleasure to see that their charmingly friendly personalities show through in the writing of the book — which makes it an even more <strong>delightful read</strong>. Thoroughly recommended!</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/ADe6TE0xCAs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/reviews/web-standardistas/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/reviews/web-standardistas/</feedburner:origLink></item>
		<item>
		<title>The Little Known font-size-adjust CSS3 Property</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/v28M91M9Uao/</link>
		<comments>http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 22:45:32 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Project 52]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1287</guid>
		<description><![CDATA[Ever wanted to use fallback fonts on your CSS with different aspect ratios without them looking huge (or tiny)? The sparkling new CSS3 font-size-adjust property could do just that, maybe. What does font-size-adjust do? First, let me warn you: you will need to use Firefox to view the examples on this page properly. Yes, not [...]]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to use fallback fonts on your CSS with different aspect ratios without them looking huge (or tiny)? The sparkling new CSS3 <code>font-size-adjust</code> property could do just that, maybe.</p>
<p><span id="more-1287"></span></p>
<h3>What does <code>font-size-adjust</code> do?</h3>
<p><em>First, let me warn you: you will need to use <strong>Firefox</strong> to view the examples on this page properly. Yes, not Safari, Firefox!</em></p>
<p>The <code>font-size-adjust</code> property allows you to specify an optimal aspect ratio <strong>for when a fallback font is used</strong>; if the substitute font has a different aspect ratio than the preferred one, the text’s <a href="http://en.wikipedia.org/wiki/X-height">x-height</a> (roughly the size of its lowercase letters) will be preserved.</p>
<p>Take a look at the image bellow:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/03/fontsizeadjust-compare.png" alt="" title="Comparison of the aspect ratio of Baskerville and Georgia" width="390" height="279" class="alignnone size-full wp-image-1293" /></p>
<p>Baskerville and Georgia don’t have the same aspect ratio, so when font fallback occurs (if Baskerville is the optimal font), the text usually looks much bigger even at the same size.</p>
<p>By using <code>font-size-adjust</code>, the original <code>font-size</code> for the fallback fonts <strong>will be divided</strong> by the <code>font-size-adjust</code> value.</p>
<p><em>Do not confuse <code>font-size-adjust</code> with <code><a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/css/property/-webkit-text-size-adjust">-webkit-text-size-adjust</a></code>, which is used to specify the size adjustment of text on the iPhone.</em></p>
<h3>How to determine the correct <code>font-size-adjust</code> value</h3>
<p>The example on the W3C specification is very clear:</p>
<blockquote cite="http://www.w3.org/TR/css3-fonts/#relative-sizing-the-font-size-adjust-pro"><p>
Authors can calculate the aspect value for a given font by comparing spans with the same content but different font-size-adjust properties. If the same font-size is used, the spans will match when the font-size-adjust value is accurate for the given font.
</p></blockquote>
<p>I’m going to basically repeat its example here.</p>
<p>Let’s take a look at the following code, in which we have a paragraph with two <code>span</code>s. </p>
<p>The CSS:</p>
<pre class="brush: css; title: ; notranslate">p { font-family:Times New Roman; font-size:400px; }
			
span { border:solid 1px red; }
			
.adjust { font-size-adjust:0.5; }</pre>
<p>The HTML:</p>
<pre class="brush: xml; title: ; notranslate">&lt;p&gt;&lt;span&gt;a&lt;/span&gt;&lt;span class=&quot;adjust&quot;&gt;a&lt;/span&gt;&lt;/p&gt;</pre>
<p>Both <code>span</code>s inherit the <code>font-family</code> from its parent (the <code>p</code> element), but the second <code>span</code> has the <code>font-size-adjust</code> property applied to it, with a <strong>random value</strong>.</p>
<p>If you check the <a href="http://webdesignernotebook.com/examples/font-size-adjust-test.html">example page</a>, look at the example on the left: the red boxes don’t match size in height — the <code>font-size-adjust</code> value is wrong.</p>
<p><em>[Do all the boxes on the example page have the same height? What did I say? Firefox…]</em></p>
<p>After a few experiments, I’ve arrived at the value of “0.455”. Now here’s the CSS for the second example (on the right):</p>
<p>The CSS:</p>
<pre class="brush: css; title: ; notranslate">p { font-family:Times New Roman; font-size:400px; }
			
span { border:solid 1px green; }
			
.adjust { font-size-adjust:0.455; }</pre>
<p>If you go ahead to the <a href="http://webdesignernotebook.com/examples/font-size-adjust-test.html">example page</a>, you will see that on the example with the green borders, both a’s bounding boxes have the same height — now we have the <strong>correct</strong> <code>font-size-adjust</code> value for our preferred font.</p>
<h3>An example</h3>
<p>Here’s <a href="http://webdesignernotebook.com/examples/font-size-adjust.html">a quick example</a> I’ve created just to show this working on actual text.</p>
<p>The font stack consists of: Calibri, Lucida Sans and Verdana (and this is the order by which the fonts are displayed on the page).</p>
<p>Safari’s rendering of the page:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/03/font-size-adjust-safari.png" alt="" title="Font-size-adjust in Safari" width="597" height="361" class="alignnone size-full wp-image-1292" /></p>
<p>And Firefox’s:</p>
<p><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/03/font-size-adjust-ff.png" alt="" title="Font-size-adjust in Firefox" width="597" height="357" class="alignnone size-full wp-image-1291" /></p>
<p>As you can see, Firefox maintains <strong>the same x-height</strong> independent of which font is being used.</p>
<p>I’m not concerned with the text not being aligned, the purpose of this example is to show how <code>font-size-adjust</code> can affect the <strong>consistency of the font size and the font&#8217;s legibility</strong>.</p>
<p>Also, even though the first <code>div</code> has the correct font stack, I had to manually specify Lucida Sans and Verdana for the other <code>div</code>s, so you (and I) can see the difference even if we have all three fonts installed.</p>
<h3>Last comments</h3>
<p>I guess using this property may eventually have some negative implications on how typography is treated throughout a website, but that can be the topic for another post — the main goal here is <strong>just to showcase</strong> a quite obscure CSS3 property that may be useful in some cases.</p>
<p>I confess I haven’t tested it on a “real” project yet, so I’d be happy to hear your thoughts.</p>
<p>This is, for now, only supported by Firefox for Windows from version 1.0 and from 3.0 on all platforms. There is a <a href="https://bugs.webkit.org/show_bug.cgi?id=15257">bug filed for Webkit</a> to fix this issue though.</p>
<h3>References and further reading</h3>
<ul>
<li><a href="http://www.w3.org/TR/css3-fonts/#relative-sizing-the-font-size-adjust-pro">Relative sizing: the ‘font-size-adjust’ property — CSS Fonts Module Level 3</a></li>
<li><a href="https://developer.mozilla.org/samples/cssref/font-size-adjust.html">CSS Examples: font-size-adjust — Mozilla Developer Center</a></li>
<li><a href="https://developer.mozilla.org/en/CSS/font-size-adjust">font-size-adjust — Mozilla Developer Center</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29">Comparison of layout engines (Cascading Style Sheets) — Wikipedia</a></li>
<li><a href="http://dbaron.org/log/20080613-firefox3-css#font-size-adjust">Some new CSS features in Firefox 3 — David Baron&#8217;s Weblog</a></li>
<li>And another CSS fonts-related article that might interest you (by me): <a href="http://www.smashingmagazine.com/2010/03/01/css-and-the-future-of-text/">The Future Of CSS Typography</a> — on Smashing Magazine</li>
</ul>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/v28M91M9Uao" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/</feedburner:origLink></item>
		<item>
		<title>A Quick Note About the :empty Pseudo-class</title>
		<link>http://feedproxy.google.com/~r/WebDesignerNotebook/~3/wLe5oB2Kik0/</link>
		<comments>http://webdesignernotebook.com/css/a-quick-note-about-the-empty-pseudo-class/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 23:34:02 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Project 52]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1264</guid>
		<description><![CDATA[I&#8217;m in love with the simplicity that CSS3 selectors can bring to our stylesheets. Here&#8217;s a brief explanation of one of my favourites: the :empty pseudo-class. What is the :empty pseudo-class Here is the definition taken from the W3C Selectors Level 3 specification: The :empty pseudo-class represents an element that has no children at all. [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m in love with the simplicity that CSS3 selectors can bring to our stylesheets. Here&#8217;s a brief explanation of one of my favourites: the <code>:empty</code> pseudo-class.</p>
<p><span id="more-1264"></span></p>
<h3>What is the <code>:empty</code> pseudo-class</h3>
<p>Here is the definition taken from the <a href="http://www.w3.org/TR/css3-selectors/#empty-pseudo">W3C Selectors Level 3 specification</a>:</p>
<blockquote cite="http://www.w3.org/TR/css3-selectors/#empty-pseudo"><p>
The <code>:empty</code> pseudo-class represents an element that has no children at all.
</p></blockquote>
<p>Seems easy enough, right? That&#8217;s because it is. The <code>:empty</code> pseudo-class is going to target elements that are completely empty; for example, an empty paragraph:</p>
<pre class="brush: xml; title: ; notranslate">&lt;p&gt;&lt;/p&gt;</pre>
<p>Or an empty table cell:</p>
<pre class="brush: xml; title: ; notranslate">&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</pre>
<p>It won&#8217;t target this paragraph though (there is a space within the <code>p</code> tag, therefore it isn&#8217;t <em>empty</em>):</p>
<pre class="brush: xml; title: ; notranslate">&lt;p&gt; &lt;/p&gt;</pre>
<h3>A practical example</h3>
<p>So when can this selector be useful?</p>
<p>Image you&#8217;re styling a table and some of the data cells have no content — you can style them differently using the magic <code>:empty</code> pseudo-class.</p>
<p>Let&#8217;s take the table I&#8217;ve created for the <a href="http://webdesignernotebook.com/css/a-beautiful-table/">Adding Style with CSS: A Beautiful Table</a> article. I&#8217;m going to use the same CSS, but change the data to make it simpler (the data I&#8217;ve added makes no sense, but you get the point…). I&#8217;m also going to remove the content in a few cells, to make this example relevant.</p>
<p>So this is our markup:</p>
<pre class="brush: xml; title: ; notranslate">&lt;table&gt;

	&lt;caption&gt;A simple table&lt;/caption&gt;
    
	&lt;thead&gt;    
		&lt;tr&gt;
			&lt;th scope=&quot;col&quot; rowspan=&quot;2&quot;&gt;Some headings&lt;/th&gt;
			&lt;th scope=&quot;col&quot; colspan=&quot;4&quot;&gt;More headings&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th scope=&quot;col&quot;&gt;Great&lt;/th&gt;
			&lt;th scope=&quot;col&quot;&gt;Brilliant&lt;/th&gt;
			&lt;th scope=&quot;col&quot;&gt;Genius&lt;/th&gt;
			&lt;th scope=&quot;col&quot;&gt;Good&lt;/th&gt;
		&lt;/tr&gt;        
	&lt;/thead&gt;

	&lt;tfoot&gt;
		&lt;tr&gt;
			&lt;th scope=&quot;row&quot;&gt;Interesting totals&lt;/th&gt;
			&lt;td&gt;155&lt;/td&gt;
			&lt;td&gt;165&lt;/td&gt;
			&lt;td&gt;70&lt;/td&gt;
			&lt;td&gt;140&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tfoot&gt;
    
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th scope=&quot;row&quot;&gt;Curious&lt;/th&gt;
			&lt;td&gt;5&lt;/td&gt;
			&lt;td&gt;35&lt;/td&gt;
			&lt;td&gt;50&lt;/td&gt;
			&lt;td&gt;15&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th scope=&quot;row&quot;&gt;Awesome&lt;/th&gt;
			&lt;td&gt;75&lt;/td&gt;
			&lt;td&gt;90&lt;/td&gt;
			&lt;td&gt;&lt;/td&gt;
			&lt;td&gt;5&lt;/td&gt;
		&lt;/tr&gt; 
		&lt;tr&gt;
			&lt;th scope=&quot;row&quot;&gt;Fabulous&lt;/th&gt;
			&lt;td&gt;30&lt;/td&gt;
			&lt;td&gt;&lt;/td&gt;
			&lt;td&gt;20&lt;/td&gt;
			&lt;td&gt;80&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th scope=&quot;row&quot;&gt;Nice&lt;/th&gt;
			&lt;td&gt;45&lt;/td&gt;
			&lt;td&gt;40&lt;/td&gt;
			&lt;td&gt;&lt;/td&gt;
			&lt;td&gt;40&lt;/td&gt;
		&lt;/tr&gt;
        
	&lt;/tbody&gt;

&lt;/table&gt;</pre>
<p>This is what I&#8217;m going to add to the CSS:</p>
<pre class="brush: css; title: ; notranslate">tbody td:empty {
	background: #EFEFEF;
	}</pre>
<p>And now the empty cells are styled differently! I don&#8217;t think this could have been much easier.</p>
<p>Also, if you really need to ask, this selector works on the latest versions of Firefox, Safari, Chrome and Opera. It will probably work on Internet Explorer 9, like most CSS3 selectors will. (The first person to point out the obvious, will be directed to <a href="http://trentwalton.com/2010/03/08/quoting-lebowski/">this link</a>. — Thanks, <a href="http://jackosborne.co.uk/">Jack</a>, for helping me remember the link!)</p>
<p>Here&#8217;s the example:</p>
<p><a class="example" href="http://webdesignernotebook.com/examples/empty-selector.html">View example</a></p>
<p>So, will you be using this selector any time soon?</p>
<img src="http://feeds.feedburner.com/~r/WebDesignerNotebook/~4/wLe5oB2Kik0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/a-quick-note-about-the-empty-pseudo-class/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		<feedburner:origLink>http://webdesignernotebook.com/css/a-quick-note-about-the-empty-pseudo-class/</feedburner:origLink></item>
	</channel>
</rss>
