<?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/" 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>Mon, 06 Sep 2010 19:28:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</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 xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="webdesignernotebook" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>My thoughts on LESS</title>
		<link>http://webdesignernotebook.com/css/my-thoughts-on-less/</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;">aside h1 { font-size: 24px; }
aside h2 { font-size: 18px; }</pre>
<p>You can have:</p>
<pre class="brush: css;">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;">@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;">.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;">body {
    …
    color: #77b59d;
    …
}</pre>
<p>Or the borders of your posts:</p>
<pre class="brush: css;">article {
    …
    border-bottom: 1px solid #77b59d;
    …
}</pre>
<p>Or as the background of your footer:</p>
<pre class="brush: css;">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;">@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;">#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;">.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;">nav {
	.grad-linear(#b3cdcc,#718a89);
}</pre>
<p>What your compiled .css file will show:</p>
<pre class="brush: css;">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;">/* A normal CSS comment */</pre>
<p>Or this:</p>
<pre class="brush: css;">// 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;">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;">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;">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;">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;">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>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/my-thoughts-on-less/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Books: “HTML and CSS Web Standards Solutions”</title>
		<link>http://webdesignernotebook.com/reviews/web-standardistas/</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>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/reviews/web-standardistas/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Little Known font-size-adjust CSS3 Property</title>
		<link>http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/</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;">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;">&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;">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>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/the-little-known-font-size-adjust-css3-property/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>A Quick Note About the :empty Pseudo-class</title>
		<link>http://webdesignernotebook.com/css/a-quick-note-about-the-empty-pseudo-class/</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;">&lt;p&gt;&lt;/p&gt;</pre>
<p>Or an empty table cell:</p>
<pre class="brush: xml;">&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;">&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;">&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;">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>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/a-quick-note-about-the-empty-pseudo-class/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Do designers need a personal style?</title>
		<link>http://webdesignernotebook.com/design/do-designers-need-a-personal-style/</link>
		<comments>http://webdesignernotebook.com/design/do-designers-need-a-personal-style/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 23:27:13 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Project 52]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1189</guid>
		<description><![CDATA[A post by Darren Hoyt caught my eye the other day (among the hundreds of unread posts on my RSS reader…) where he asked whether designers needed a personal style or not. I wrote up a quick comment at the time, but I feel the question deserves a little more discussion — specially because no-one [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.darrenhoyt.com/2010/01/07/design-versatility/">A post by Darren Hoyt</a> caught my eye the other day (among the hundreds of unread posts on my RSS reader…) where he asked whether designers needed a personal style or not. I wrote up a quick comment at the time, but I feel the question deserves a little more discussion — specially because no-one seems to have a definite answer (my bet is that there isn&#8217;t one).</p>
<p><span id="more-1189"></span></p>
<h3>The question</h3>
<p>So Darren asked:</p>
<blockquote cite="http://www.darrenhoyt.com/2010/01/07/design-versatility/">
<p>Is it more attractive when designers can…<br />
a) design like a chameleon in any style or genre appropriate to the project, or<br />
b) design over a period of years in a consistent, signature style</p>
</blockquote>
<p>And, this was (part of) my comment:</p>
<blockquote cite="http://www.darrenhoyt.com/2010/01/07/design-versatility/#comment-29854">
<p>I feel that <strong>the best designers usually have their own style</strong>, even if it’s quite subtle and hardly noticeable in some instances — there is always something of their own that they added to the work. And when I don’t immediately recognize one of their work, when I finally look at it, I will usually say “Ah, now I see it.”</p>
<p>While artists have usually a more evident personal style, <strong>designers go through their professionals paths adapting their work</strong> to the requirements. Artists don’t do that. But <strong>we both evolve</strong> throughout the years and, in my opinion, we both walk towards a style, or a way of working even, that is adapted to ourselves.</p>
</blockquote>
<h3>A or B?</h3>
<p>Basically, my opinion is still the same, I&#8217;d just like to elaborate on it a little more.</p>
<p>I certainly admire a designer that can completely transform their style for every project they work on, but <strong>I don&#8217;t think that happens very often</strong>, and I can&#8217;t even think of an example of a great web designer that does that, to illustrate this thought.</p>
<p>What I notice often though, is great web designers that <em>do</em> have a personal style, but that can adapt it for each project. It&#8217;s the details, or <strong>the way each project is handled</strong>. I like to think it&#8217;s adding a bit of their own selves to each thing they design.</p>
<p>Here are a couple of examples to illustrate my point.</p>
<p><strong><a href="http://www.31three.com/">Jesse Bennett-Chamberlain</a></strong> is constantly creating stunning pieces of work and that doesn&#8217;t mean all his work looks the same. But they do come together to produce a solid portfolio that you can look at and say it&#8217;s definitely Jesse&#8217;s.</p>
<div id="attachment_1194" class="wp-caption alignnone" style="width: 610px"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/01/port_mwb.jpg" alt="" title="Jesse Bennett-Chamberlain&#039;s Mobile Web Design" width="600" height="516" class="size-full wp-image-1194" /><p class="wp-caption-text">Jesse Bennett-Chamberlain's Mobile Web Design</p></div>
<div id="attachment_1195" class="wp-caption alignnone" style="width: 610px"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/01/port_cm1.jpg" alt="" title="Jesse Bennett-Chamberlain&#039;s Campaign Monitor design" width="600" height="603" class="size-full wp-image-1195" /><p class="wp-caption-text">Jesse Bennett-Chamberlain's Campaign Monitor design</p></div>
<p>Another example is <a href="http://mikeprecious.com/"><strong>Mike Precious</strong></a>, whose work is, like Jesse&#8217;s, stunning. Every single piece on his portfolio makes me want to just stare at it. The way he treats photography and how his projects have a deep, rich texture (not literally) is something that is seen across all of his work. And that doesn&#8217;t mean the end result is a boring &#8220;everything looks the same&#8221; portfolio.</p>
<div id="attachment_1196" class="wp-caption alignnone" style="width: 610px"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/01/wb-gbb.jpg" alt="" title="Mike Precious&#039; Green Business Bureau design" width="600" height="653" class="size-full wp-image-1196" /><p class="wp-caption-text">Mike Precious' Green Business Bureau design</p></div>
<div id="attachment_1197" class="wp-caption alignnone" style="width: 610px"><img src="http://webdesignernotebook.com/wp_livesite/wp-content/uploads/2010/01/wb-marriagetoday.jpg" alt="" title="Mike Precious&#039; Marriage Today design" width="600" height="717" class="size-full wp-image-1197" /><p class="wp-caption-text">Mike Precious' Marriage Today design</p></div>
<p>There are other designers that fit the description. Take, for instance, <a href="http://www.ndesign-studio.com/">Nick La</a>, <a href="http://massiveblue.com/">Sam Brown</a>, or <a href="http://madebyelephant.com/">Tim Van Damme</a>. You get my point, right?</p>
<p>It doesn&#8217;t mean they use the same elements all the time, or the same special effects. It&#8217;s something you notice when you look at the overall design, <strong>it&#8217;s how you feel</strong> when you use the interfaces they create.</p>
<h3>Not artists</h3>
<p>I guess it&#8217;s safe to say <strong>designers are not artists</strong>, in a sense that a painter is an artist, or a musician is an artist. We have conventions to follow, briefs to guide us, users&#8217; feedback, clients to report to, etc.</p>
<p>(Actually, painters often had clients to report to and briefs to follow. A <a href="http://www.nationalgallery.org.uk/whats-on/calendar/guided-tours-morning/382040">guided tour around the National Gallery</a> will let you know that that happened more often than not. But when a painting is finished, it&#8217;s finished forever.)</p>
<p>So, we don&#8217;t usually create work because we really only need to let our emotions flow, to show to the world our vision. Our work is going to be used and abused by others. However, that doesn&#8217;t impede us from <strong>adding a bit of ourselves to our work</strong> or to be creative and original.</p>
<h3>Adapting to a brief</h3>
<p>It&#8217;s incredibly hard to keep coming up with exciting new designs every month, and I believe the process of creating them is even more important then the style that is required to create them. And even if we have to adapt our creativity to whatever the brief requires, our process of working will invariably stay the same, or be very similar between projects. That may mean we always come up with something completely new and amazing, that was never seen before — and the fact that we <strong>do</strong> come up with that all the time may actually be the <strong>constant</strong> in our work.</p>
<p>One of the things that sometimes strikes me as unfair as a designer is how we are required to have a logical explanation for whatever it is we design, for every single detail, colour, position of the elements on a page, etc.</p>
<p>&#8220;Where is the theory that proves that placing this there is correct? Where is the study behind it? Why are you using blue?&#8221;</p>
<p>In my opinion, there is always a place for subjectivity, for just following your instinct to know what&#8217;s right. <strong>Sometimes you just feel that something <em>is</em> right</strong>, and there is no logic to it. And maybe that little bit you add is what creates your personal style.</p>
<p>Pardon me, I digress.</p>
<h3>Your thoughts</h3>
<p>So what do you think? Do you feel there is one correct answer to the question? Do you consider yourself a chameleon or would you rather be recognized for having a strong personal style?</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/design/do-designers-need-a-personal-style/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Clients Aren’t Stupid</title>
		<link>http://webdesignernotebook.com/rants/clients-arent-stupid/</link>
		<comments>http://webdesignernotebook.com/rants/clients-arent-stupid/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 23:15:34 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[Project 52]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1222</guid>
		<description><![CDATA[The first time I came across the Clients From Hell website I laughed and sympathised with the poor designers that had sent those quotes in. I’m not laughing now though. Just an example The website mentioned above is just an example of something we tend to do frequently: make the client sound stupid, like he [...]]]></description>
			<content:encoded><![CDATA[<p>The first time I came across the <a href="http://clientsfromhell.tumblr.com/">Clients From Hell</a> website I laughed and sympathised with the poor designers that had sent those quotes in. I’m not laughing now though.</p>
<p><span id="more-1222"></span></p>
<h3>Just an example</h3>
<p>The website mentioned above is just an example of something we tend to do frequently: make the client sound stupid, like he or she will never understand the complexity of our work.</p>
<p><strong>Oh, aren’t we clever?</strong></p>
<p>No. We are not brighter than our clients. We are not more intelligent, like sometimes I’m led to believe if I listen to some conversations and to the constant moaning.</p>
<p>I was recently in a meeting with a client — a clever, intelligent person; he was asking us questions that we, as “people of the Web”, would have never considered. His questions reminded me of <strong>how much we take as common knowledge</strong> when talking to and designing to the general public.</p>
<p>This made me realise how sometimes we probably sound like obnoxious snobs, and how I should probably be even more careful than I already am when talking to someone that doesn’t work on the Web.</p>
<p>Lots of intelligent people just don’t understand the terms we use and are probably completely lost in some conversations and meetings. That won’t help us pass our points across.</p>
<h3>Making an effort</h3>
<p>But am I accusing the wrong side? <strong>Should clients simply make more of an effort to learn the jargon?</strong> After all, there is a learning curve for when someone starts working with a website. We all know too well that one of the biggest problems with the client/designer (I’m using this term very loosely here) relationship happens when the client has faulty expectations about the input that will be required from him or her during the process.</p>
<p>We too learn the jargon of others, out of necessity. Like when we go to the mechanic or something breaks around the house, and we have to talk to a technician, another professional. We understand that by having a car, we need to make the effort of knowing at least a little bit of how it works, so we don’t catch ourselves stranded in the middle of the night in a lonely road, helpless.</p>
<p>But that doesn’t mean I know what a mechanic is talking about when he’s going on and on about what’s wrong with my car. And I would probably be completely lost if I had to speak to a textile designer or an architect about their work. I just hope they explain it to me in a way I can understand and trust them to do their best work.</p>
<h3>Respect</h3>
<p>Sometimes people are just plain mean, or disrespectful. That is a completely different thing. Like in any other business, there are tough clients, tough people that we have to deal with. But not knowing that an online image is to be measured in pixels, shouldn’t make a client from Hell:</p>
<blockquote cite=””><p>I need to know what size you need the graphics for the website. Is two? Maybe three inches good?</p>
</blockquote>
<p>Or maybe we should make things clear in our terms of service and contracts:</p>
<blockquote cite=””><p>“I thought your quote was for an unlimited time limit, I’m not finished with my changes and I don’t want to pay any extra!”</p>
</blockquote>
<p>And, of course, sometimes people are just clueless:</p>
<blockquote cite=””><p>I need to get moving, anyway you can do some work on this on your vacation. That’s a long vacation, I bet you’ll get bored anyway, and this is back-and-forth via email, not phone, so it shouldn’t cause you any stress.</p>
</blockquote>
<h3>Conclusion</h3>
<p>I have no conclusion. I still haven’t found the secret to convey my work and my methods in a simple way. Even the words that sound the simpler to us strike me as sounding completely foreign during meetings (like JavaScript, HTML or CSS). But I’m sure as hell making a bigger effort of not being patronising, of putting myself on other people’s shoes, and trying to make things sound as clear as possible.</p>
<p>I feel most of the times, if we are facing a “client from Hell”, <strong>it’s our fault</strong> and we should do something to fix that.</p>
<p>And now I hope I don’t ever have to complain about a client again, or at least remember of not doing it in front of someone else. That would be most embarrassing.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/rants/clients-arent-stupid/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Quitting Project 52</title>
		<link>http://webdesignernotebook.com/project-52/quitting-project-52/</link>
		<comments>http://webdesignernotebook.com/project-52/quitting-project-52/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 18:59:32 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[Project 52]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1230</guid>
		<description><![CDATA[A few weeks ago I mentioned I had signed up for Project 52 — an effort to produce one article per week. I’ve found that it’s not going as I expected; it’s not that I don’t want to write the content, but the schedule of one post per week is just not working for me. [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I mentioned I had signed up for <a href="http://project52.info/">Project 52</a> — an effort to produce one article per week. I’ve found that it’s not going as I expected; it’s not that I don’t want to write the content, but the schedule of one post per week is just not working for me.</p>
<p><span id="more-1230"></span></p>
<h3>Writing when you feel like it</h3>
<p>This may come as surprise, since I’ve been dutifully posting one post per week, haven’t failed a single week and have 3 other posts for the upcoming weeks already finished. But I feel the writing process shouldn’t be forced or constrained. <strong>I want to write when I’m in the mood for it</strong>, and I want to make the posts live immediately, before I regret anything I’ve written (which sometimes happens and posts are thrown in the trash).</p>
<p>Yesterday I stumbled across a post by Jeffrey Zeldman, <a href="http://www.zeldman.com/2009/08/09/write-when-inspired/">“Write when inspired”</a>, where he expresses the exact same feelings I have with regards to writing:</p>
<blockquote cite=”http://www.zeldman.com/2009/08/09/write-when-inspired/”>
<p>You are writing for readers, a duty as sacred, in its way, as parenting. (&#8230;) The world is already choking on half-considered, squeezed-out shit. There’s no need to add to the pile.</p>
<p>If you want to be great, or at least to be better, start by breathing, taking breaks, and working intensely when the mood is on.</p>
</blockquote>
<p>I agree. I don’t want to write something because I have to, <strong>I want to write because I want to write</strong>. And I’m concerned that lots of “half-considered, squeezed-out shit” is going to be published because people feel they absolutely “have to”.</p>
<p>Don’t get me wrong, I’m all for people practicing the art of writing; it forces you to organise your thoughts, to make sense of what’s going on in your head. But not when you are not in the mood.</p>
<h3>Too many ideas</h3>
<p>My biggest problem with writing is that I have too many ideas in the pipeline — I feel I should be writing at all times.</p>
<p>By observing what goes on around me in a sort of analytical (some would probably say cold and indifferent…) way, it’s very easy for ideas to keep popping into my head. Sometimes I’ll leave those ideas for a while, until when I feel more comfortable or have the time to make them into a post; but other times I need to write them down right there and then.</p>
<p>That’s been happening quite frequently lately, and it happens more often with non-technical posts, with posts that may incite more discussion than actually provide an answer to a question. These types of posts are usually written in one go; there is no need for technical revisions — ideas are much more subjective, I can say whatever I want (sort of).</p>
<h3>Not really quitting…</h3>
<p>So I won’t actually “quit” Project 52, but I’ll do it <strong>on my own terms</strong>. Hopefully, by the end of the year, I’ll have around 52 posts published during 2010, but I may have published 3 articles in a week and then nothing for 2 months, if I didn’t feel like it.</p>
<p>I didn’t forget your suggestions for future posts, and I’ll make my best to make those posts happen, so thank you for sending those in.</p>
<p>Thank you for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/project-52/quitting-project-52/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Book Review: “CSS Mastery — 2nd Edition”</title>
		<link>http://webdesignernotebook.com/reviews/css-mastery/</link>
		<comments>http://webdesignernotebook.com/reviews/css-mastery/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 19:39:30 +0000</pubDate>
		<dc:creator>inayaili</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Project 52]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1159</guid>
		<description><![CDATA[I&#8217;m frequently confronted with the question of &#8220;which CSS books would you recommend?&#8221; and CSS Mastery is always at the top of the list. Here&#8217;s the audio review I did for the Boagworld podcast. The audio Listen! Transcript If you&#8217;d rather read, here&#8217;s the transcript of the review: Hi, my name is Yaili and I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m frequently confronted with the question of &#8220;which CSS books would you recommend?&#8221; and <a href="http://www.amazon.com/CSS-Mastery-Advanced-Standards-Solutions/dp/1430223979/">CSS Mastery</a> is always at the top of the list. Here&#8217;s the audio review I did for the <a href="http://boagworld.com/reviews/css-mastery-2">Boagworld podcast</a>.</p>
<p><span id="more-1159"></span></p>
<h3>The audio</h3>
<p><object data="http://boos.audioboo.fm/swf/fullsize_player.swf" height="129" id="iefix1" type="application/x-shockwave-flash" width="400"><param name="movie" value="http://boos.audioboo.fm/swf/fullsize_player.swf" /><param name="scale" value="noscale" /><param name="salign" value="lt" /><param name="bgColor" value="#FFFFFF" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="window" /><param name="FlashVars" value="mp3Author=yaili&amp;mp3LinkURL=http%3A%2F%2Faudioboo.fm%2Fboos%2F93079-css-mastery-2nd-edition-review&amp;mp3Title=CSS+Mastery+2nd+Edition+%E2%80%94+Review&amp;mp3Time=07.35pm+24+Jan+2010&amp;mp3=http%3A%2F%2Faudioboo.fm%2Fboos%2F93079-css-mastery-2nd-edition-review.mp3" /><a href="http://audioboo.fm/boos/93079-css-mastery-2nd-edition-review.mp3">Listen!</a></object></p>
<h3>Transcript</h3>
<p><strong>If you&#8217;d rather read, here&#8217;s the transcript of the review:</strong></p>
<p>Hi, my name is Yaili and I&#8217;ll be reviewing the Second Edition of CSS Mastery, by Andy Budd.</p>
<h4>Who is the book for?</h4>
<p>The book states that it&#8217;s for &#8220;anybody with a basic knowledge of HTML and CSS&#8221; and experts. I&#8217;d say it&#8217;s more for the first case, but I&#8217;ll expand on that later.</p>
<p>There are lots of useful tips and tricks, that I&#8217;m sure you&#8217;ll use over and over, explained in a solid and easy to understand way. The fact that the examples can be seen online and that there are files that can be downloaded is great.</p>
<h4>It&#8217;s a second edition</h4>
<p>When I read the first edition, I was just starting to work with CSS, and CSS was still a bit of a mystery to me. I remember reading some things that I thought to be pure magic and that seemed very complicated, but now I realise they are used by any good CSS coder. So, at the time, the book opened my eyes to those techniques and to the possibilities of what could be done with CSS.</p>
<h4>Content</h4>
<p>The book covers subjects from the beginning to a more advanced level.</p>
<p>It starts with the importance of semantic HTML, how to set good foundations. It takes a very brief look into microformats and HTML5 as well.</p>
<p>Then it moves onto selectors, with some more advanced and CSS3 ones — but it doesn&#8217;t go very deep into that area to be honest.</p>
<p>It explains the box model, which is rather important, very well. Liquid and elastic layouts.</p>
<p>Some more advanced techniques, like sliding doors and even multiple backgrounds, which is quite refreshing. Opacity and rgba colours.</p>
<p>There are some clever uses for the :target pseudo-class and attribute selectors. Some webkit proprietary code like gradients and reflections.</p>
<p>It also explains how to style lists and navigation. I would have liked to see a larger section for definition lists, because there&#8217;s only a small section and it sounds a bit negative (or even dismissive) and I don&#8217;t think it makes them justice.</p>
<p>There are some negative comments on CSS frameworks. Which I frankly agree with.</p>
<p>A good introduction to the IE layout issue. Some common browser bugs and how to fix them. And how to work with graded browser support.</p>
<p>Then on the examples, at certain points they can be a little repetitive, but there&#8217;s an interesting discussion about website widths, a brief example of using jQuery, which is rather nice.</p>
<h4>Conclusion</h4>
<p>In conclusion, as someone who had already read the book, reading it again was good, as there are always things that you forget or that you weren&#8217;t aware of, even though my experience now is completely different, and I can be a little more critical about it.</p>
<p>If I could change something in the book, I think I&#8217;d change the naming of CSS3 — in the specs it&#8217;s always mentioned with no spaces, and in the book it has a space between the second &#8220;S&#8221; and the number &#8220;3&#8243;. I know it sounds nitpicky, but it&#8217;s rather annoying for me, for some reason…</p>
<p>Also, there are some mentions to browsers that are already dated, even though the book is fairly recent (like &#8220;Safari 4 beta&#8221;, which is already out of Beta). But that&#8217;s just something that happens in our industry — things move too quickly. I&#8217;m just being nitpicky again.</p>
<p>So, have <em>I</em> learned anything from this second edition? I did learn a few things, but not much. I already use or know most of the techniques. But would someone starting to work with CSS learn anything from the book? Definitely yes. I used to always recommend the first edition whenever someone asked me for book recommendations, and I will keep recommending it with the second edition. It&#8217;s a must-have.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/reviews/css-mastery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://audioboo.fm/boos/93079-css-mastery-2nd-edition-review.mp3" length="2928768" type="audio/mpeg" />
		</item>
		<item>
		<title>WordPress: Flexible Pages Lists With The Extended Page List Plugin</title>
		<link>http://webdesignernotebook.com/wordpress/wordpress-flexible-pages-lists-with-the-extended-page-list-plugin/</link>
		<comments>http://webdesignernotebook.com/wordpress/wordpress-flexible-pages-lists-with-the-extended-page-list-plugin/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 08:00:32 +0000</pubDate>
		<dc:creator>Inayaili León</dc:creator>
				<category><![CDATA[Project 52]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesignernotebook.com/?p=1166</guid>
		<description><![CDATA[WordPress is quite versatile and easy to use, but it seems to fail in some features that should be present at its core, like the ability to list pages&#8217; content easier. Here&#8217;s an explanation of how to use a little plugin I found recently, and that doesn&#8217;t seem to be that widely known or documented. [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress is quite versatile and easy to use, but it seems to fail in some features that should be present at its core, like the ability to list pages&#8217; content easier. Here&#8217;s an explanation of how to use a little plugin I found recently, and that doesn&#8217;t seem to be that widely known or documented.</p>
<p><span id="more-1166"></span></p>
<h3>Me, the designer</h3>
<p>As I&#8217;ve said here before, eve though I&#8217;m not a complete beginner, my knowledge of WordPress is fairly limited. I&#8217;m essentially a front-end person, so the less I have to dive into PHP and the likes, the better. My goal is to always find a balance between flexible code and simplicity.</p>
<p>If, by the end of the post, you feel this could be easily done with another technique, feel free to leave a comment.</p>
<h3>My problem</h3>
<p>I needed to display the list of a certain page&#8217;s sub-pages, along with an excerpt from those pages. Very simple, right?</p>
<p>After some searches on Google and within the Codex, there didn&#8217;t seem to be a simple solution — that&#8217;s when <a href="http://twitter.com/andrewfox">Andrew</a> pointed me to the <a href="http://wordpress.org/extend/plugins/extended-page-lists/">Extended Page List plugin</a>.</p>
<h3>How to use the plugin</h3>
<p>First step: install the plugin.</p>
<p>The plugin uses a shortcode (<code>[epl]</code>) that you can add directly into your posts, and customise with some <a href="http://wordpress.grandslambert.com/plugins/extended-page-lists/shortcode-usage.html">parameters</a>. It overrides the <a href="http://codex.wordpress.org/Function_Reference/get_pages"><code>get_pages()</code></a> function, so you can use all of <code>get_pages()</code> parameters, plus a few more.</p>
<p>When editing a page, you would use something like this:</p>
<pre class="brush: xml;">[epl showexcerpt=1]</pre>
<p>But I needed to add the plugin to a template, to be used on a number of pages. The client was going to be able to edit the introductory text on each parent page, but the list of sub-pages should be generated automatically bellow that.</p>
<p>So I used the <a href="http://codex.wordpress.org/Function_Reference/do_shortcode">do_shortcode function</a> on my template file. Its Codex page is not that useful.</p>
<p>This function allows you to call a shortcode and use it just as you would use it within a post (or page). So I could now do this:</p>
<pre class="brush: xml;">&lt;?php echo do_shortcode('[epl sort_column=menu_order showexcerpt=1 excerptlength=20 excerptmore=&quot;Read more&amp;hellip;&quot; morelink=1 excerpttag=&quot;&quot;]'); ?&gt;</pre>
<p>As you may notice, I used many of the parameters supported by the plugin to control what was displayed on the page. That&#8217;s one of the things I love about this plugin — the flexibility. You can control everything, from the excerpt&#8217;s length, to the HTML element that you want wrapping the whole block, or each page, which CSS class to apply, etc.</p>
<h3>Done!</h3>
<p>And that&#8217;s all! I decided to put this little post together, since I didn&#8217;t find any documentation on how to use this plugin within a template file — the plugin&#8217;s website itself doesn&#8217;t seem to mention it. And, although it may be clear to many people, it wasn&#8217;t for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/wordpress/wordpress-flexible-pages-lists-with-the-extended-page-list-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The CSS3 :target Pseudo-class And CSS Animations</title>
		<link>http://webdesignernotebook.com/css/the-css3-target-pseudo-class-and-css-animations/</link>
		<comments>http://webdesignernotebook.com/css/the-css3-target-pseudo-class-and-css-animations/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 07:30:05 +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=1140</guid>
		<description><![CDATA[It&#8217;s no secret that I&#8217;m always looking for an easy way out using CSS instead of trying to replicate things with convoluted code — there are so many underused techniques that we could be applying to our designs as an enhancement layer! In this experience, I take a brief look into the :target pseudo-class and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no secret that I&#8217;m always looking for an easy way out using CSS instead of trying to replicate things with convoluted code — there are so many underused techniques that we could be applying to our designs as an enhancement layer! In this experience, I take a brief look into the <code>:target</code> pseudo-class and a very simple CSS animation.</p>
<p><span id="more-1140"></span></p>
<h3>The :target pseudo-class</h3>
<p>We often use <strong>fragment identifiers</strong> in our code — usually to point to a specific element on a page, represented by a &#8220;#&#8221; and an anchor. When we click on a link that ends with a fragment identifier (for example, <a href="http://en.wikipedia.org/wiki/Lost_%28TV_series%29#Fandom_and_popular_culture">this one</a>), that element we are pointing to becomes the <strong>target</strong> (hence <code>:target</code>).</p>
<p>This <code>:target</code> pseudo-class can be styled, just like we style the <code>:hover</code> or <code>:active</code> pseudo-classes on links.</p>
<p>To see an example in the wild, go to Wikipedia and click on a reference link (for example, <a href="http://en.wikipedia.org/wiki/Lost_%28TV_series%29#cite_note-16">this one</a>). If you are using a good browser, you will see it has a light blue background; and if you look at the CSS, you will see this:</p>
<pre class="brush: css;">ol.references &gt; li:target, sup.reference:target, span.citation:target, cite:target  {
background-color:#DDEEFF;
}</pre>
<p>Pretty easy, right?</p>
<h3>Our example</h3>
<p>If you&#8217;re impatient, you can take a look at the final example now (use Safari):</p>
<p><a href="/examples/target.html" class="example">View example</a></p>
<p>I&#8217;m going to create a simple list of links (using fragment identifiers) to blocks of text bellow them. Here&#8217;s the markup:</p>
<pre class="brush: xml;">&lt;div id=&quot;content&quot;&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#b1&quot;&gt;Block 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#b2&quot;&gt;Block 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#b3&quot;&gt;Block 3&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#b4&quot;&gt;Block 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div id=&quot;b1&quot;&gt;
	&lt;p&gt;One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. &quot;What's happened to me? &quot; he thought.&lt;/p&gt;
&lt;/div&gt;

&lt;div id=&quot;b2&quot;&gt;
	&lt;p&gt;The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack.&lt;/p&gt;
&lt;/div&gt;

&lt;div id=&quot;b3&quot;&gt;
	&lt;p&gt;Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean.&lt;/p&gt;
&lt;/div&gt;

&lt;div id=&quot;b4&quot;&gt;
	&lt;p&gt;Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;</pre>
<h3>The basic CSS</h3>
<p>First, we need to cover the basics. I&#8217;ll use a very <strong>simple reset</strong> for this example, but you should use a proper one in your projects. I&#8217;ll just set the <code>font-size</code>, <code>line-height</code>, <code>font-family</code> and reset <code>padding</code> and <code>margin</code> for the elements we are using:</p>
<pre class="brush: css;">body {
	font:62.5%/1.5 Cambria,Georgia,&quot;Times New Roman&quot;,Times,serif;
	}
div, ul, li, a, p {
	padding:0; margin:0;
	}</pre>
<p>Second, I will quickly style the <strong>container</strong> <code>div</code> &#8220;<code>content</code>&#8220;:</p>
<pre class="brush: css;">#content {
	width:500px;
	margin:auto;
	font-size:1.4em;
	}</pre>
<p>Third, the rest of the elements. I will:</p>
<ol>
<li>Add a small bottom margin to the list and to each block of text.</li>
<li>Remove the bullets from our list — we don&#8217;t need them for the example.</li>
<li>Add some padding and a light border to the blocks of text.</li>
<li>Make the first line of each paragraph in small caps. Just because I can.</li>
</ol>
<p>Notice I&#8217;m using the <a href="http://www.w3.org/TR/2009/PR-css3-selectors-20091215/#child-combinators"><strong>child combinator</strong></a> (or selector) to make sure the <code>div</code>&#8216;s I&#8217;m targeting are the ones that are <strong>direct descendants</strong> of the main &#8220;<code>content</code>&#8221; <code>div</code>. So if, for some reason, I were to have <code>div</code>&#8216;s inside the blocks of text, they wouldn&#8217;t be affected. Also, I don&#8217;t have to give these <code>div</code>&#8216;s a class or target them by their <code>id</code>&#8216;s.</p>
<pre class="brush: css;">ul, div &gt; div {
	margin-bottom:1em;
	}
li {
	list-style:none;
	}
div &gt; div {
	padding:1em;
	border:1px solid #ffffd3;
	}
div &gt; div p:first-line {
	font-variant:small-caps;
	font-size:1.2em;
	}</pre>
<h3>The juicy bit</h3>
<p>Now I&#8217;m going to style the <code>:target</code> pseudo-class. First, I&#8217;ll add a slightly <strong>darker border</strong> than the non-targeted <code>div</code>&#8216;s:</p>
<pre class="brush: css;">div &gt; div:target {
	border:1px solid #dac89d;
	}</pre>
<p>Enters the CSS animation. To create an animation you need two things: <strong>a definition</strong> of what effect the animation produces and <strong>a call</strong> to the animation from the element you want to animate.</p>
<p><strong>Let&#8217;s define the animation first.</strong></p>
<p>I&#8217;ll define the animation by setting up keyframes at certain points. In this case, I want the background to start as white, then fade to a light yellow, then back to white — I will need <strong>3 different steps</strong> (or keyframes).</p>
<p>Imagine each step is a simple selector, but instead of having for example this:</p>
<pre class="brush: css;">div {
	background: red;
	}</pre>
<p>we need to specify a moment in time (using percentages, or just &#8220;<code>to</code>&#8221; and &#8220;<code>from</code>&#8221; if we only need &#8220;<code>0%</code>&#8221; and &#8220;<code>100%</code>&#8220;):</p>
<pre class="brush: css;">10% {
	background: red;
	}</pre>
<p>Also, here I will <strong>name my animation</strong>. I will call it &#8220;<code>target</code>&#8220;:</p>
<pre class="brush: css;">@-webkit-keyframes target {
	from { background:#ffffff; }
	50% { background:#ffffd3; }
	to { background:#ffffff; }
	}</pre>
<p>So, the animation is defined, now we need to call it from the <code>:target</code> selector. We can either set each property separately, or use the shorthand version. Let&#8217;s see the full code:</p>
<pre class="brush: css;">div &gt; div:target {
	border:1px solid #dac89d;
	-webkit-animation-name:target;
	-webkit-animation-duration:.5s;
	-webkit-animation-iteration-count:1;
	-webkit-animation-direction:linear;
	}</pre>
<p>The <code>-webkit-</code> bits should be self-explanatory. We need to specify the animation&#8217;s name (&#8220;<code>target</code>&#8220;), it&#8217;s duration (&#8220;<code>.5s</code>&#8220;, half a second), how many times it should be repeated (&#8220;<code>1</code>&#8220;) and it&#8217;s direction (&#8220;<code>linear</code>&#8220;).</p>
<p>The <strong>shorthand</strong> version looks like this instead:</p>
<pre class="brush: css;">div &gt; div:target {
	border:1px solid #dac89d;
	-webkit-animation:target .5s linear;
	}</pre>
<p>Much simpler! Because we only want the animation to repeat once, we can even not specify the &#8220;<code>1</code>&#8221; in this case (if you wanted to, you could have it right after the &#8220;<code>.5s</code>&#8220;). Let&#8217;s say you want the animation to repeat twice, you would specify it like this:</p>
<pre class="brush: css;">div &gt; div:target {
	border:1px solid #dac89d;
	-webkit-animation:target .5s 2 linear;
	}</pre>
<h3>The end</h3>
<p>I hope you enjoyed this brief tutorial. There are endless possibilities for CSS animation and for more advanced CSS selectors, but I feel that the ones I&#8217;m showing here can actually be used on real projects with <strong>no damage for users</strong> browsing the web with less friendly browsers.</p>
<p>Do you agree? Have you used the <code>:target</code> pseudo-class on your projects? How about CSS animation?</p>
<p><em>Note: This animation is only visible on Safari (and Chrome, like <a href="http://webdesignernotebook.com/css/the-css3-target-pseudo-class-and-css-animations/#comment-4768">Dougal kindly pointed out</a>!). The <code>:target</code> pseudo-class is not yet supported by Internet Explorer. Firefox and Opera will just show the darker border when you click on the links, but that is a good compromise.</em></p>
<h3>Resouces</h3>
<ul>
<li><a href="http://webkit.org/blog/324/css-animation-2/">CSS Animation — Surfin&#8217; Safari Blog</a></li>
<li><a href="http://www.w3.org/TR/2009/PR-css3-selectors-20091215/#target-pseudo">The target pseudo-class :target — W3C Specification</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://webdesignernotebook.com/css/the-css3-target-pseudo-class-and-css-animations/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>
