<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	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/"
	>

<channel>
	<title>Adam Darowski &#187; Markup</title>
	<atom:link href="http://www.darowski.com/tracesofinspiration/category/markup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darowski.com/tracesofinspiration</link>
	<description>Adam Darowski is a daddy of two and User Experience Designer for BatchBlue Software.</description>
	<lastBuildDate>Sun, 23 Oct 2011 03:38:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Portfolio Item: PatientsLikeMe Tech Blog</title>
		<link>http://www.darowski.com/tracesofinspiration/2010/05/24/new-portfolio-item-patientslikeme-tech-blog/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2010/05/24/new-portfolio-item-patientslikeme-tech-blog/#comments</comments>
		<pubDate>Mon, 24 May 2010 18:58:39 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[PatientsLikeMe]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=1203</guid>
		<description><![CDATA[A couple weeks ago, I got a chance to quickly redesign and relaunch the dormant PatientsLikeMe tech blog. My goal is for the super smart and talented PatientsLikeMe Product &#038; Technology team to use the blog as a way to share some of the exciting things we&#8217;re working on. I kicked off the relaunch with [...]]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago, I got a chance to quickly redesign and relaunch the dormant PatientsLikeMe tech blog. My goal is for the super smart and talented PatientsLikeMe Product &#038; Technology team to use the blog as a way to share some of the exciting things we&#8217;re working on. I kicked off the relaunch with a post about <a href="http://tech.patientslikeme.com/2010/05/12/manage-your-css3-tricks-with-sass-mixins/">Sass mixins and CSS3</a>. If you haven&#8217;t seen Sass (or much of CSS3 for that matter), I invite you to check it out.</p>
<p>I wrote a wee bit more about the project on the <a href="http://www.darowski.com/tracesofinspiration/portfolio/patientslikeme-tech-blog/">portfolio page</a> for it. Here&#8217;s a full screenshot so you can take a look:</p>
<p><a class="button" href="http://tech.patientslikeme.com">Visit site &raquo;</a></p>
<p><a href="http://www.darowski.com/tracesofinspiration/wp-content/themes/new/images/portfolio/fullsize/patientslikeme-blog.png"><img class="sample-small" src="http://www.darowski.com/tracesofinspiration/wp-content/themes/new/images/portfolio/patientslikeme-blog.png" alt="PatientsLikeMe Tech Blog screenshot" /></a><br />
<span class="click-fullsize"><a href="http://www.darowski.com/tracesofinspiration/wp-content/themes/new/images/portfolio/fullsize/patientslikeme-blog.png">(full size image)</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2010/05/24/new-portfolio-item-patientslikeme-tech-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Newbie&#8217;s First Impressions of Haml and Sass</title>
		<link>http://www.darowski.com/tracesofinspiration/2010/01/11/this-newbies-first-impressions-of-haml-and-sass/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2010/01/11/this-newbies-first-impressions-of-haml-and-sass/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 12:59:21 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Haml]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Sass]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=1052</guid>
		<description><![CDATA[Up until this past October, I was just your average web designer/developer writing markup in XHTML (with some Rails goodness mixed in), styling it with CSS, and checking it in with SVN. Life was pretty simple… well, until I needed to do something like work on a different code branch or find that damn unclosed [...]]]></description>
			<content:encoded><![CDATA[<p>Up until this past October, I was just your average web designer/developer writing markup in XHTML (with some Rails goodness mixed in), styling it with CSS, and checking it in with SVN. Life was pretty simple… well, until I needed to do something like work on a different code branch or find that damn unclosed <code>div</code>.</p>
<p>Upon joining <a href="http://patientslikeme.com/">PatientsLikeMe</a>, I learned that I&#8217;d be shaking up this comfy part of my life as well. PatientsLikeMe is also a Rails app, but the views are built in <a href="http://haml-lang.com/">Haml</a> and the site&#8217;s CSS is built with <a href="http://sass-lang.com/">Sass</a>. (We use <a href="http://git-scm.com/">Git</a> for version control, but that&#8217;s a post for another time.)</p>
<h2>What the heck are Haml and Sass?</h2>
<p>According to Haml&#8217;s <a href="http://haml-lang.com/about.html">About</a> page,  Haml is:</p>
<blockquote><p>Haml is a markup language that’s used to cleanly and simply describe the HTML of any web document without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ASP, and ERB, the templating language used in most Ruby on Rails applications. However, Haml avoids the need for explicitly coding HTML into the template, because it itself is a description of the HTML, with some code to generate dynamic content.</p></blockquote>
<p>And Sass is described on its <a href="http://sass-lang.com/about.html">About</a> page as:</p>
<blockquote><p>Sass is a meta-language on top of CSS that’s used to describe the style of a document cleanly and structurally, with more power than flat CSS allows. Sass both provides a simpler, more elegant syntax for CSS and implements various features that are useful for creating manageable stylesheets.</p></blockquote>
<p>While it felt a bit overwhelming to learn a new way to do what I&#8217;ve been doing for years, Haml &#038; Sass definitely make sense for me. I&#8217;m a designer/developer, but definitely approach things from more of a development side. I get just as excited (if not more) about a clean document structure and re-use of style elements as I do about a gorgeous look and feel. Anything you want to do in HTML &#038; CSS is possible with Haml &#038; Sass—it&#8217;s just a more efficient way of getting there. And there&#8217;s so much more!</p>
<h2>What do Haml and Sass look like?</h2>
<p>The best way to get what it&#8217;s all about is to take a look at some code. Here&#8217;s a codeblock of HTML/ERB, taken directly from the <a href="http://haml-lang.com/tutorial.html">Haml tutorial page</a>:</p>
<p><code class="block">&lt;div id=&quot;content&quot;&gt;<br />
&nbsp;&nbsp;&lt;div class=&quot;left column&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2&gt;Welcome to our site!&lt;/h2&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;&lt;%= print_information %&gt;&lt;/p&gt;<br />
&nbsp;&nbsp;&lt;/div&gt;<br />
&nbsp;&nbsp;&lt;div class=&quot;right column&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= render :partial =&gt; &quot;sidebar&quot; %&gt;<br />
&nbsp;&nbsp;&lt;/div&gt;<br />
&lt;/div&gt;<br />
</code></p>
<p>Here&#8217;s how that block would look in Haml:</p>
<p><code class="block">#content<br />
&nbsp;&nbsp;.left.column<br />
&nbsp;&nbsp;&nbsp;&nbsp;%h2 Welcome to our site!<br />
&nbsp;&nbsp;&nbsp;&nbsp;%p= print_information<br />
&nbsp;&nbsp;.right.column<br />
&nbsp;&nbsp;&nbsp;&nbsp;= render :partial =&gt; &quot;sidebar&quot;<br />
</code></p>
<p>Pretty badass, huh? Much cleaner. I thought I&#8217;d miss writing full markup. But I&#8217;m also a huge fan of nicely indented, properly closed markup. The fact that Haml&#8217;s indentation is what defines the document structure is awesome. You don&#8217;t have to hunt for closing <code>&lt;/div&gt;</code> tags and whatnot. I recommend reading that entire tutorial (it&#8217;s quite short).</p>
<p>While Haml is really cool, Sass is what I&#8217;m really psyched about. I work in Sass a lot more than I work in anything else now, and I&#8217;m still discovering ways that it vastly improves my CSS development.</p>
<p>Here&#8217;s what a very simple bit of Sass code looks like:</p>
<p><code class="block">h1<br />
&nbsp;&nbsp;height: 118px<br />
&nbsp;&nbsp;margin-top: 1em<br />
.tagline<br />
&nbsp;&nbsp;font-size: 26px<br />
&nbsp;&nbsp;text-align: right<br />
</code></p>
<p>Pretty much expected, this would render as:</p>
<p><code class="block">h1 {<br />
&nbsp;&nbsp;height: 118px;<br />
&nbsp;&nbsp;margin-top: 1em;<br />
}<br />
.tagline {<br />
&nbsp;&nbsp;font-size: 26px;<br />
&nbsp;&nbsp;text-align: right;<br />
}</code></p>
<p>&#8220;Huh? What&#8217;s the benefit there?&#8221; you might ask. I mean, all it does is remove the semi-colons and braces! </p>
<p><strong><em>Oh, but wait.</em></strong></p>
<h2>Things that make Sass kick ass</h2>
<p>Buckle up for this part. Today, I want to tell you about three thing that will blow your CSS-writin&#8217; mind.</p>
<ol>
<li>Nesting</li>
<li>Variables</li>
<li>Mixins</li>
</ol>
<h3>Nesting</h3>
<p>In <a href="http://partners.patientslikeme.com/css/screen.css">one of my recent (and favorite) style sheets</a>, I started using much longer selectors not only to ensure my styles are targeting the right elements, but also to be visually manageable in my style sheet. </p>
<p>Take this block of styles targeted for a specific page on the site:</p>
<p><code class="block">body#home.partners div#content h1 { margin-bottom: 20px; }<br />
body#home.partners div#content h2 { background: url(../images/press-head-bg.png) repeat-x top left; border-top: 1px solid #4097E5; padding: 8px; }<br />
body#home.partners div#content p { font-size: 90%; }<br />
body#home.partners div#content div#main dl { position: relative; min-height: 160px; }<br />
body#home.partners div#content div#main dt { margin-left: 170px; border-top: 2px solid #4899E9; padding: 4px 0; }<br />
body#home.partners div#content div#main dt a { color: #000; font-weight: bold; }<br />
body#home.partners div#content div#main dd { margin-left: 170px; font-size: 85%; }<br />
body#home.partners div#content div#main dd.logo { position: absolute; top: 0; left: 0; margin: 0; }<br />
body#home.partners div#content div#main dd.logo img { border: 1px solid #999; }</code></p>
<p>Yeah, I one-lined it. I&#8217;ve been into that lately. But Sass doesn&#8217;t support it (<a href="http://twitter.com/chriseppstein/status/6357850692">yet, but it&#8217;s coming</a>).</p>
<p>One of the reasons I like one-line CSS is that it&#8217;s easy to read the selectors. But why keep typing the same things over and over? The same thing can be accomplished in Sass with this:</p>
<p><code class="block">body#home.partners<br />
&nbsp;&nbsp;div#content<br />
&nbsp;&nbsp;&nbsp;&nbsp;h1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-bottom: 20px<br />
&nbsp;&nbsp;&nbsp;&nbsp;h2<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background: url(../images/press-head-bg.png) repeat-x top left<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border-top: 1px solid #4097E5<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 8px<br />
&nbsp;&nbsp;&nbsp;&nbsp;p<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-size: 90%<br />
&nbsp;&nbsp;&nbsp;&nbsp;div#main<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: relative<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min-height: 160px<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-left: 170px<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border-top: 2px solid #4899E9<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 4px 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color: #000<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-weight: bold<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-left: 170px<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-size: 85%<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#038;.logo<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position: absolute<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top: 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left: 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border: 1px solid #999</code></p>
<p>Longer? Yes. Easier to read? Hell yes.</p>
<p>This is pretty straight forward. If you indent an element under another element, you&#8217;ll chain them together. The output in CSS can get larger as you nest deeper and deeper, but the Sass file becomes much easier to manage. Your web development brethren may gasp if they peek at your stylesheet, but you&#8217;ll be able to write and manage it much faster in the Sass file.</p>
<p>One thing in the above code block that might look unfamiliar is the <code>&#038;.logo</code>. What &#8220;&#038;&#8221; means is &#8220;repeat the parent selector&#8221;. In this case, one parent is <code>dd</code>, so the selector becomes <code>dd.logo</code>. You can do many different things with this, such as putting <code>&#038;:hover</code> after an <code>a</code> or even putting <code>* html &#038;</code> nested beneath a selector to target IE6.</p>
<p>Wait, what? Mix IE hacks in with your main CSS? Yes, I realize that this invalidates your CSS and goes against some &#8220;best practices&#8221;, but trust me—it&#8217;s easier to manage. When you keep browser hacks in a separate style sheet, you forget about them until you&#8217;re actually thinking about that browser. A seemingly harmless tweak to your main stylesheet might break something in your IE stylesheet. But outta sight, outta mind and you don&#8217;t know it until a user complains. By keeping the IE hacks along with the main CSS, you can see how your change might affect other browsers.</p>
<p>If you&#8217;re still worried about invalidating your stylesheet, well&#8230; that means you haven&#8217;t even tried CSS3 yet. So, really, I got nothing for ya here.</p>
<p>In your Sass, I&#8217;ve started targeting different versions of IE along with the standard style like this:</p>
<p><code class="block">h1<br />
&nbsp;&nbsp;padding: 1em<br />
&nbsp;&nbsp;*padding: 2em / targets both IE6 and IE7, does not target IE8<br />
&nbsp;&nbsp;* html &#038;<br />
&nbsp;&nbsp;&nbsp;&nbsp;padding: 3em / resets IE6 in case it needs to be different from IE7</code></p>
<p>The <code>*</code> right before the selector will target IE6 and IE7 but leave IE8 alone (well, technically all browsers read that as an invalid line an ignore it… except for IE6 and IE7). The trusty <code>* html</code> hack will only target IE6. A slash, as you probably guessed, starts a comment in Sass. This IE targeting method may not be the prettiest thing in the world, but it keeps everything in one place so you easily manage all browser styling at once. When you change the padding of the <code>h1</code>, it provides you with a reminder to check other browsers where you served targeted tweaks.</p>
<p>Last thing about nesting, you can also use it for properties like <code>font</code>, <code>border</code>, <code>margin</code>, etc. Like so:</p>
<p><code class="block">h1<br />
&nbsp;&nbsp;border:<br />
&nbsp;&nbsp;&nbsp;&nbsp;color: black<br />
&nbsp;&nbsp;&nbsp;&nbsp;style: solid<br />
&nbsp;&nbsp;&nbsp;&nbsp;width: 1px</code></p>
<p>That would produce:</p>
<p><code class="block">h1 {<br />
&nbsp;&nbsp;border-color: black;<br />
&nbsp;&nbsp;border-style: solid;<br />
&nbsp;&nbsp;border-width: 1px;<br />
}</code></p>
<p>Of course,  you may prefer to write this out in shorthand (<code>h1 { border: 1px solid black;</code>), but there are times when doing it this way can come in handy.</p>
<p>Anyway, let&#8217;s move on to some more awesome.</p>
<h3>Variables</h3>
<p>There was a time when I thought variables in CSS might be the only thing that could make it any better. And variables are indeed awesome. Variables are a great way to store values that you&#8217;ll use over and over again, such as colors, fonts, graphics, or anything else reusable in your project.</p>
<p>Here are some variables we set for colors that indicate severity:</p>
<p><code class="block">!severity_normal = #CCC<br />
!severity_none = #1DAE49<br />
!severity_mild = #FEDC32<br />
!severity_moderate = #FF8F02<br />
!severity_severe = #D93019</code></p>
<p>To call one of these values, simply do this:</p>
<p><code class="block">a<br />
&nbsp;&nbsp;&#038;:hover<br />
&nbsp;&nbsp;&nbsp;&nbsp;background-color = !severity_mild</code></p>
<p>Huzzah!</p>
<p>Now try this—it&#8217;ll blow your mind: Just set your target page width. Then use that variable and perform simple operations on it to calculate the widths of your layout&#8217;s columns!</p>
<p><code class="block">!page_width = 1000px<br />
…<br />
#main<br />
&nbsp;&nbsp;width: !page_width * .7<br />
#sidebar<br />
&nbsp;&nbsp;width: !page_width * .3</code></p>
<p>This turns into:</p>
<p><code class="block">#main<br />
&nbsp;&nbsp;width: 700px;<br />
#sidebar<br />
&nbsp;&nbsp;width: 300px;</code></p>
<p>Looks simple, but IMAGINE THE POSSIBILITIES! But there&#8217;s actually one more thing that will <em>really</em> rock your world…</p>
<h3>Mixins</h3>
<p>If Sass mixins were a rock band, I&#8217;d have the tee shirt. What are they? The description from the <a href="http://sass-lang.com/tutorial.html">Sass tutorial</a> says:</p>
<blockquote><p>Mixins are one of the most powerful aspects of Sass. They allow re-use of styling &#8211; properties or even entire rules &#8211; without having to re-write them or move them into a non-semantic class.</p>
<p>To define a mixin, just write =mixin-name with some Sass nested underneath. To use it, write +mixin-name where you want it to be expanded.</p></blockquote>
<p>Mixins can be incredibly simple or very complex. Here&#8217;s a pretty simple one:</p>
<p><code class="block">=alternate_font<br />
&nbsp;&nbsp;font-family: 'Lucida Grande', 'Lucida Sans Unicode'<br />
&nbsp;&nbsp;letter-spacing: -.03em</code></p>
<p>Say you&#8217;ve set a default font on your <code>body</code>, but want to apply an alternate font here and there. Instead of adding those fonts every time, just put it as a mixin. This could also be done as a variable, but since we&#8217;re also tweaking the <code>letter-spacing</code>, it is better to do it with a mixin. The best part of mixins like this one is that <strong>they eliminate the need to add frivolous class names that are only used for style targeting</strong>.</p>
<p>Let&#8217;s apply it:</p>
<p><code class="block">h1<br />
&nbsp;&nbsp;+alternate_header_font</code></p>
<p>And that will render as:</p>
<p><code class="block">h1 {<br />
&nbsp;&nbsp;font-family: 'Lucida Grande', 'Lucida Sans Unicode';<br />
&nbsp;&nbsp;letter-spacing: -.03em;<br />
}</code></p>
<p>You can also pass arguments within mixins. If you&#8217;re into rounded corners, ever get tired of defining the <code>-moz</code> and <code>-webkit</code> properties <em>every single time</em>?</p>
<p>Try this instead:</p>
<p><code class="block">=border_radius(!radius)<br />
&nbsp;&nbsp;:border-radius = "#{!radius}px"<br />
&nbsp;&nbsp;:-moz-border-radius = "#{!radius}px"<br />
&nbsp;&nbsp;:-webkit-border-radius = "#{!radius}px"</code></p>
<p>Then when you want to round the corners of an element, just add this:</p>
<p><code class="block">#sidebar<br />
&nbsp;&nbsp;border: 2px solid #666<br />
&nbsp;&nbsp;background-color: #CCC<br />
&nbsp;&nbsp;+border_radius(8)</code></p>
<p>That will add 8-pixel rounded corners for all (supported) browsers. I recently worked on a design that was so well-rounded you could call it Alan Trammell. This mixin alone would have been a breeze to use and very much welcomed.</p>
<p>Okay, one more example because this was a very handy one I used the other day. I had a couple links I wanted to place a divider pipe between. You know, the type of treatment you often see in footers. I saw that <a href="http://www.patientslikeme.com/members/view/91">Cris</a> had already written a mixin for it called &#8220;divider_pipe&#8221;, and it looked something like this:</p>
<p><code class="block">=divider_pipe(!x_position=0, !y_position=50%)<br />
&nbsp;&nbsp;background:<br />
&nbsp;&nbsp;&nbsp;&nbsp;image = "url(/images/divider.gif)"<br />
&nbsp;&nbsp;&nbsp;&nbsp;repeat: no-repeat<br />
&nbsp;&nbsp;position = !x_position !y_position<br />
&nbsp;&nbsp;&#038;.first<br />
&nbsp;&nbsp;&nbsp;&nbsp;background-image: none</code></p>
<p>You catch that? Awesome! Basically, you just apply it to the <code>li</code> in Sass, like this:</p>
<p><code class="block">#footer<br />
&nbsp;&nbsp;ul<br />
&nbsp;&nbsp;&nbsp;&nbsp;li<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+divider_pipe</code></p>
<p>What that will do is place the divider on the left side of each <code>li</code>, but also look for an <code>li</code> with a class of &#8220;first&#8221; and turn off the background image for that one. Perfect! Once all our target browsers support pseudo-elements, we&#8217;ll be able to simply use a <code>:first-child</code>, but until then, this worked like a charm. You&#8217;ll notice you can also pass in some arguments here to alter the x- and y-positioning of the pipe on the fly.</p>
<p>Sass mixins can be as simple or as complex as you&#8217;d like. They can be used for just one rule you want to add over and over (without adding frivolous class names). They can be used for content boxes you use over and over that you need to receive arguments, variables, and all sorts of custom rules. Mixins are as powerful as you want to make them.</p>
<h2>And what do I think?</h2>
<p>Haml is pretty simple. I like it because it leads to a clean document structure, proper indenting, proper tag closing, etc. But Sass is the real life-changer, here.</p>
<p>I&#8217;ve gotten used to Sass enough that I keep forgetting to put semicolons in my plain ol&#8217; CSS. While the nesting makes Sass incredibly easy to manage for the developer, it does lead to some less than beautiful output. But I think that is a fair tradeoff because it makes things so much easier to manage.</p>
<p>The same can be said for managing targeted browser tweaks inline with the standard Sass. It&#8217;s not the traditional way of doing things in CSS, but keeping it all together ensures less conflicts in the end.</p>
<p>In a way, I&#8217;ve needed to let go of some of the artificial &#8220;best practices&#8221; instilled in me while learning CSS. But the reality is that Sass comes with a whole new set of &#8220;best practices&#8221; that, in my opinion, lead to better results.</p>
<p>And that&#8217;s what matters most.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2010/01/11/this-newbies-first-impressions-of-haml-and-sass/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Selective Degradation of Modern CSS for Internet Explorer</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/11/30/selective-degradation-of-modern-css-for-internet-explorer/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/11/30/selective-degradation-of-modern-css-for-internet-explorer/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 02:46:59 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=1032</guid>
		<description><![CDATA[Progressive enhancement. Graceful degradation. Progressive enrichment.
There are a lot of terms out there for &#8220;making sure things work nicely in every browser, even if it doesn&#8217;t work or look exactly the same in all of them&#8221;. I was thinking about the approach I took on a recent project, the Criminal Justice School Guide. I suppose [...]]]></description>
			<content:encoded><![CDATA[<p>Progressive enhancement. Graceful degradation. <a href="http://www.handcraftedcss.com/">Progressive enrichment.</a></p>
<p>There are a lot of terms out there for &#8220;making sure things work nicely in every browser, even if it doesn&#8217;t work or look exactly the same in all of them&#8221;. I was thinking about the approach I took on a recent project, the <a href="http://www.darowski.com/tracesofinspiration/portfolio/criminal-justice-school-guide/">Criminal Justice School Guide</a>. I suppose it is kind of like progressive enrichment&#8230; but with a bit of graceful degradation thrown in. </p>
<p>What does that mean? Well, first of all the case for this approach was an easy one to make when working with a client (<a href="http://avenue100.com/">Avenue100</a>, and directly with an old friend and colleague <a href="http://traydiggz.com/">Tracy Shaw</a>) who gets web standards. What I did was take a mockup and build the design in CSS using the very latest CSS techniques. Only then did I take a look at the design in other browsers.</p>
<p>The difference between what I did on this project and some others is that I only fixed major design elements. If it wasn&#8217;t a big deal, I shrugged it off. LET ME TELL YOU it was a great feeling. &#8220;Does that corner <em>really</em> need to be rounded? Nope!&#8221; This way the browser hacks are kept to a minimum (and quarantined in separate style sheets) and the site is ready to play ball when Internet Explorer finally is.</p>
<p>Let&#8217;s call it&#8230; &#8220;selective degradation&#8221;. <img src='http://www.darowski.com/tracesofinspiration/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Today I want to look at four areas of the design, see how they look in Internet Explorer vs. a real browser, and show the markup and style examples.</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/11/cj-examples.png" alt="cj-examples" title="cj-examples" width="800" class="framed" /></p>
<h2>1. Search field</h2>
<p>The first task was to create a search form that sits over a partially transparent rounded box that also sits on top of some other geometric shapes. It&#8217;s easy enough to cram all of that in a background image and let the form sit on top of it, but why do that when you can produce a more bulletproof approach that allows the rounded box to grow with the form (if need be). Here&#8217;s how I styled the form:</p>
<p><code class="block">form#search {<br />
&nbsp;&nbsp;float: right;<br />
&nbsp;&nbsp;background-color: rgba(183,180,170,.4);<br />
&nbsp;&nbsp;padding: 10px 20px;<br />
&nbsp;&nbsp;margin: 16px 12px;<br />
&nbsp;&nbsp;border-radius: 10px;<br />
&nbsp;&nbsp;-moz-border-radius: 10px;<br />
&nbsp;&nbsp;-webkit-border-radius: 10px;<br />
}<br />
</code></p>
<p>The <code>float</code>ing, <code>padding</code>, and <code>margin</code>s are all standard stuff. The <code>background-color</code> and <code>border-radius</code>, however, are not. <code>border-radius</code>, of course, will round the corners of the box. Only it doesn&#8217;t work in Internet Explorer (even IE8!). How about the <code>background-color</code>? That&#8217;s RGBa, which allows you to define a background color WITH a transparency level. Of course, IE8 can&#8217;t figure that out either.</p>
<p>So, what should we do? Well, just like I said right away. Cram it all in a background image. So, here&#8217;s the fix:</p>
<p><code class="block">div#header { background: url(../images/ie/header.png) no-repeat right top; }</code></p>
<p>All versions of IE are served a header that has the rounded, semi-transparent box as part of the background image. It&#8217;s not as bulletproof, but do users of Internet Explorer really care about that? Nope. Problem solved.</p>
<h2>2. Rounded content window</h2>
<p>See that rounded top of the content box? That&#8217;s a pretty important design element, so let&#8217;s keep it rounded for everyone. Easy enough to do in Firefox:</p>
<p><code class="block">div#content {<br />
&nbsp;&nbsp;clear: left;<br />
&nbsp;&nbsp;background-color: #FFF;<br />
&nbsp;&nbsp;border: 2px solid #EAEAEA;<br />
&nbsp;&nbsp;margin: 0 12px;<br />
&nbsp;&nbsp;padding: 12px;<br />
&nbsp;&nbsp;border-radius: 10px 10px 0 0;<br />
&nbsp;&nbsp;-moz-border-radius: 10px 10px 0 0;<br />
&nbsp;&nbsp;-webkit-border-top-left-radius: 10px;<br />
&nbsp;&nbsp;-webkit-border-top-right-radius: 10px;<br />
}</code></p>
<p>The part that rounds the corners, again, is the <code>border-radius</code>. Notice that <code>-webkit-border-radius</code> doesn&#8217;t adhere to the nice shorthand that <code>-moz-border-radius</code> and <code>border-radius</code> do. That&#8217;s why you get nice long attribute names like <code>-webkit-border-top-right-radius</code>. That&#8217;s a mouthful!</p>
<p>So, what has to happen to get these corners in IE? It&#8217;s actually a little bit complex, to be honest. Here&#8217;s what I did:</p>
<p><code class="block">div#content {<br />
&nbsp;&nbsp;padding: 0 12px 12px;<br />
&nbsp;&nbsp;border-width: 0 2px;<br />
}</code></p>
<p>So, here we removed the <code>padding</code> and <code>border</code> from the top of the content box. Then:</p>
<p><code class="block">ul#navigation {<br />
&nbsp;&nbsp;overflow: hidden;<br />
&nbsp;&nbsp;background: url(../images/ie/content-rounded-top.png) no-repeat left bottom;<br />
&nbsp;&nbsp;margin: 0 12px;<br />
&nbsp;&nbsp;padding: 10px 0 0 14px;<br />
}</code></p>
<p>We instead added the rounded corners as a <code>background-image</code> on the bottom of the navigation menu above the content box. We added some extra <code>padding</code> to make up for it.</p>
<p><code class="block">ul#navigation li {<br />
&nbsp;&nbsp;padding-bottom: 12px;<br />
}</code></p>
<p>Finally we added some padding to the bottom of the list items themselves. And that did the trick!</p>
<h2>3. Rounding of inner content boxes</h2>
<p>You see how some boxes inside of the content box have rounded corners, too? You know what I decided to do about these? Nothing. Not an important design element. NEXT!</p>
<h2>4. Partially transparent stripe</h2>
<p>The stripe that goes over the photograph is a pretty major design element as well. Once again, RGBa comes to the rescue:</p>
<p><code class="block">div#home-banner div#title {<br />
&nbsp;&nbsp;float: left;<br />
&nbsp;&nbsp;margin-top: 172px;<br />
&nbsp;&nbsp;padding: 8px;<br />
&nbsp;&nbsp;width: 625px;<br />
&nbsp;&nbsp;color: #FFF;<br />
&nbsp;&nbsp;background-color: rgba(0,54,99,.6);<br />
}</code></p>
<p><a href="http://twitter.com/scottmccracken/status/4002586414">RGBawesome</a>, indeed.</p>
<p>Et tu, IE? You guessed it. Just put the blue stripe in the image itself and serve that one to IE.</p>
<p><code class="block">div#home-banner { background-image: url(../images/ie/law-and-justice-ie.jpg);</code></p>
<p>Note that this approach doesn&#8217;t make sense if the image changes often. This one, luckily for me, does not.</p>
<p>There you have it. It was a great feeling to build the site with only modern browsers in mind. This allows you to structure the markup and style in the best, most semantic way possible. Then, you can fill in <em>only the necessary</em> gaps, improving the user experience in lesser browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/11/30/selective-degradation-of-modern-css-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>:before and :after Pseudo-elements: IE8 Supports Them (But Font Sizing with Percentages Can Be Wonky)</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/11/02/before-and-after-pseudo-elements-ie8-supports-them-but-font-sizing-with-percentages-can-be-wonky/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/11/02/before-and-after-pseudo-elements-ie8-supports-them-but-font-sizing-with-percentages-can-be-wonky/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 04:04:39 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=965</guid>
		<description><![CDATA[The Darowski.com redesign launched in February relies heavily on pseudo-elments. That&#8217;s how you see all that &#8220;exposed markup&#8221; in the design without it showing up in the code.
Here&#8217;s how it looks.

So, to recap the markup of the h1 is:
&#60;h1&#62;Adam Darowski&#60;/h1&#62;

And the CSS is:
h1 { font-size: 450%; line-height: 1.2; font-weight: normal; font-style: italic; margin: 0 20px [...]]]></description>
			<content:encoded><![CDATA[<p>The Darowski.com redesign launched in February <a href="http://www.darowski.com/tracesofinspiration/2009/02/22/the-heart-of-the-redesign-css-pseudo-elements/">relies heavily on pseudo-elments</a>. That&#8217;s how you see all that &#8220;exposed markup&#8221; in the design without it showing up in the code.</p>
<p>Here&#8217;s how it looks.</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/11/safari.png" alt="The design in Safari" width="600" height="300" class="framed" /></p>
<p>So, to recap the markup of the <code>h1</code> is:</p>
<p><code class="block">&lt;h1&gt;Adam Darowski&lt;/h1&gt;<br />
</code></p>
<p>And the CSS is:</p>
<p><code class="block">h1 { font-size: 450%; line-height: 1.2; font-weight: normal; font-style: italic; margin: 0 20px 20px 40px; text-indent: -55px; }<br />
h1:before { content: &#39;&lt;h1&gt;&#39;; font-size: 50%; }<br />
h1:after { content: &#39;&lt;/h1&gt;&#39;; font-size: 50%; }<br />
</code></p>
<p>The good news is Internet Explorer 8 is the first version of IE that will actually will show the content contained in the pseudo-elements.</p>
<h2>The Problem</h2>
<p>The bad news is it looks like this:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/11/ie8-before.png" alt="The Design in IE8: Before fixes" title="ie8-before" width="600" height="275" class="framed" /></p>
<p>Wait, why is it so tiny? The problem seems to lie in the <code>h1:before, h1:after { font-size: 50%; }</code>. If you remember, I took my <code>h1</code> and boosted the size to 450%. Then, for the &#8220;exposed markup&#8221;, I dropped the font-size to 50% of that. Looks like the difference is:</p>
<ul>
<li><strong>Firefox, Safari, and Opera</strong> treat the content generated by the :before and :after pseudo-elements as <strong>part of the <code>h1</code></strong>. Because of this, the <code>font-size: 50%</code> is adjusts the <code>font-size: 450%</code>, making the &#8220;exposed markup&#8221; render at 225%.</li>
<li><strong>Internet Explorer 8</strong> treats then content generated by the :before and :after as <strong>outside of the <code>h1</code></strong>. In this case, the <code>font-size: 50%</code> is instead applied to the base text size (which in my case is <code>font-size: large</code>). This is why it looks so tiny.
<li><strong>Internet Explorer versions 7 and older</strong> are still reading <em>HTML for Dummies</em> and haven&#8217;t caught up.</li>
</ul>
<h2>The Solution</h2>
<p>Once I figured out what was happening, the fix was super easy. I created an IE8 style sheet an used a conditional comment to add it to my page. You target IE8 the same way you did older versions:</p>
<p><code class="block">&lt;!--[if IE 8]&gt;<br />
&nbsp;&nbsp;&lt;link href=&quot;style-ie8.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;<br />
&lt;![endif]--&gt;</code></p>
<p>Then in that style sheet, I simply added a pixel-based <code>font-size</code> for the pseudo-elements.</p>
<p><code class="block">h1:before, h1:after { font-size: 30px; }</code></p>
<p>Why pixel-based? Simply because IE8 won&#8217;t screw it up. It&#8217;s not ideal, but neither is Internet Explorer. Here&#8217;s how it looks:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/11/ie8-after.png" alt="The Design in IE8: After fixes" width="600" height="278" class="framed" /></p>
<p>So, if you ever generate content with :before and :after and resize it with percentages (I mean, who <em>doesn&#8217;t</em> do that every day?), that&#8217;s your solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/11/02/before-and-after-pseudo-elements-ie8-supports-them-but-font-sizing-with-percentages-can-be-wonky/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fluid Images (and How to Make Them Look Nice in Internet Explorer 6 &amp; 7)</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/10/21/fluid-images-and-how-to-make-them-look-nice-in-internet-explorer-6-7/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/10/21/fluid-images-and-how-to-make-them-look-nice-in-internet-explorer-6-7/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 11:57:46 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[PatientsLikeMe]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=920</guid>
		<description><![CDATA[Last week, I joined PatientsLikeMe full-time. I&#8217;ve known them for quite a while, though. In fact, over the past couple of years they have been my biggest (well, one of very few) freelance clients. My most recent work for them was to build the markup and style for new site for partners from a series [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, <a href="http://www.darowski.com/tracesofinspiration/2009/10/09/moving-on-to-patientslikeme/">I joined PatientsLikeMe full-time</a>. I&#8217;ve known them for quite a while, though. In fact, over the past couple of years they have been my biggest (well, one of <em>very</em> few) freelance clients. My most recent work for them was to build the markup and style for <a href="http://partners.patientslikeme.com/">new site for partners</a> from a series of mockups. (<a href="http://www.darowski.com/tracesofinspiration/portfolio/patientslikeme-partners/">Portfolio page is here.</a>)</p>
<h2>The Problem</h2>
<p>Here&#8217;s what the homepage looks like. I can dig it.</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/10/PatientsLikeMe_1256009976534.png" alt="PatientsLikeMe Partners home page" width="500" height="423" class="framed" /></p>
<p>The header, sidebar, and footer are pretty straight forward. That large graphics-and-text element in the main column is a bit different. So, how would I go about marking this up? First of all, the photos and screenshots are presentational, so we&#8217;d handle that with a background image. For the text (which is not presentational, so we want it in the markup), I tend to size using keywords and percentages. But in a case like this, I&#8217;d use some pretty pixel-specific font sizing, padding, and line breaks to get the markup to render like the mockup. Of course, I&#8217;d have to use some sort of image replacement on the &#8220;Patients + Data&#8221; title since that&#8217;s a non-standard font.</p>
<h2>But Wait!</h2>
<p>Here&#8217;s the thing. The page is actually somewhat fluid. It has a min-width of 1000 pixels and a max-width of 1200 pixels. So, even if I wanted to use that approach, I have no way of knowing exactly where the text should go because the image behind it doesn&#8217;t have a static size.</p>
<p>So&#8230; now what?</p>
<p>Well, we&#8217;re gonna rock it like it&#8217;s 1999 and just use one big honkin&#8217; image for the main column. It&#8217;s not the most elegant solution, but it will work the best. To ensure the text-based content is still available of the user turns images off, we&#8217;ll put the text in the markup. Like so:</p>
<p><code class="block">&lt;div id=&quot;image&quot;&gt;<br />
&nbsp;&nbsp;&lt;h2&gt;Patients   Data = Insight&lt;/h2&gt;<br />
&nbsp;&nbsp;&lt;p&gt;Patients are no longer just health care consumers. They are healthcare customers. &lt;strong&gt;PatientsLikeMe&lt;/strong&gt; provides deep insight into your target patients&amp;rsquo; attitudes, beliefs, behaviors, and outcomes.&lt;/p&gt;<br />
&nbsp;&nbsp;&lt;p&gt;&lt;a title=&quot;Learn more about our Products &amp;amp; Services.&quot; href=&quot;products/&quot;&gt;Learn More&amp;nbsp;&amp;raquo;&lt;/a&gt;&lt;/p&gt;<br />
&nbsp;&nbsp;&lt;a title=&quot;Learn more about our Products &amp;amp; Services.&quot; href=&quot;products/&quot;&gt;&lt;img src=&quot;images/home1.jpg&quot; alt=&quot;Home page artwork&quot; width=&quot;864&quot; height=&quot;735&quot; /&gt;&lt;/a&gt;<br />
&lt;/div&gt;<br />
</code></p>
<p>You see I have the text <em>and</em> the image present. I&#8217;ll use CSS to offset the text while keeping the image visible. That CSS looks like:</p>
<p><code class="block">div#image h2, div#image p {<br />
&nbsp;&nbsp;position: absolute;<br />
&nbsp;&nbsp;left: -1000px;<br />
&nbsp;&nbsp;width: 100px;<br />
}<br />
</code></p>
<p>Why use this instead of <code>display: none;</code>? Setting <code>display: none;</code> on an element will <em>completely</em> remove it, even for users with assistive devices such as screen readers. The offset technique will just push the content out of the viewport. It&#8217;s still actually there, just not visible. Users with CSS and images enabled will see the image and no text. Users with screen readers will simply read the text (and alt text of the image). Users with CSS AND images turned off will see just the text. The rare folks that have CSS turned off but images turned on will get both the image and the photo. I believe that&#8217;s a small enough population to make this an acceptable approach.</p>
<h2>But Wait Again!</h2>
<p>We&#8217;d actually like this image to fill the main column, whether the screen is at 1000 pixels wide, 1200 pixels wide, or somewhere in between. How do we do that?</p>
<p><code class="block">div#image img { max-width: 100%; height: auto; }<br />
</code></p>
<p>In the markup, hard-code the image&#8217;s width to fill the maximum width of the area. In the case above, it was 864 pixels. Then, the <code>max-width: 100%;</code> ensures that if the width of the <code>div</code> shrinks, the image will shrink along with it. The <code>height: auto;</code> simply will adjust the height of the image to correspond with the new width.</p>
<p>Awesome, right?</p>
<h2>Oh, the <abbr title="Internet Explorer">IE</abbr> Horror!</h2>
<p>The good news is that all the markup and CSS above works fine with Internet Explorer. Yes, even IE6. However, it&#8217;s the godawful way that IE resizes images that causes the problem.</p>
<p>Luckily, through a bit of hunting I found that by simply adding <a href="http://msdn.microsoft.com/en-us/library/ms530822(VS.85).aspx">some weird proprietary Microsoft thingie</a> to your CSS, you can fix it. I just added this line to my IE stylesheet:</p>
<p><code class="block">div#image img { -ms-interpolation-mode: bicubic; }<br />
</code></p>
<p>You can see the before and after below. Pretty remarkable difference. It becomes <em>really</em> noticable when there is text in the image.</p>
<p><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2009/10/interpolationdemo.png" alt="ms-interpolation: bicubic; - Demo" width="720" height="459" class="framed" /></p>
<p><strong>One caveat:</strong> I tried to use this technique on a PNG file. It didn&#8217;t work. However, I re-saved the image as a high quality JPG and it worked. So I suppose Microsoft assumed you would only want to do this for photos or something?</p>
<p><strong>One more caveat:</strong> If you have many images on the page with <code>-ms-interpolation-mode: bicubic</code> added to them and do any window resizing, things can get slow really quickly. Ethan Marcotte wrote a <a href="http://unstoppablerobotninja.com/entry/fluid-images/">more complicated but higher performance method for handling this</a>. If you&#8217;re talking one or two images on a page though, you&#8217;re fine with this approach.</p>
<p>And there you have it. Your image will stretch to your desired max- and min-width, and even look nice in Internet Explorer 6 and 7 (IE8 actually resizes images like a real web browser).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/10/21/fluid-images-and-how-to-make-them-look-nice-in-internet-explorer-6-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Portfolio Addition: The Small Business Web</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/04/20/new-portfolio-addition-the-small-business-web/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/04/20/new-portfolio-addition-the-small-business-web/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 04:50:08 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[BatchBlue]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Darowski Dot Com]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Microformats]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=678</guid>
		<description><![CDATA[I recently added a new project to my Portfolio: a one-pager for The Small Business Web (visit site). I designed it in just one day, but I liked it enough to put it in. Here she is:

I figured I&#8217;d share some markup &#038; style for a couple of page elements. Hopefully you&#8217;ll find it useful.
&#8220;Tweet [...]]]></description>
			<content:encoded><![CDATA[<p>I recently added a new project to my Portfolio: a one-pager for <a href="http://www.darowski.com/tracesofinspiration/portfolio/the-small-business-web/">The Small Business Web</a> (<a href="http://thesmallbusinessweb.com/">visit site</a>). I designed it in just one day, but I liked it enough to put it in. Here she is:</p>
<p><img class="sample-small" src="http://www.darowski.com/tracesofinspiration/wp-content/themes/new/images/portfolio/sbweb.png" alt="Small Business Web screenshot" /></p>
<p>I figured I&#8217;d share some markup &#038; style for a couple of page elements. Hopefully you&#8217;ll find it useful.</p>
<h2>&#8220;Tweet this page&#8221; button</h2>
<p>In this day and age, &#8220;Tweet it&#8221; buttons are becoming more and more important. Not only does a Tweet it button give users the ability to quickly post a page to Twitter, it reminds them to do so. There are online services out there that will make Tweet it buttons for you. Might as well roll your own. Here, clicking the &#8220;Tweet this page&#8221; button will send you to Twitter (if you&#8217;re logged in) and prepare a message that says &#8220;Small businesses are taking over the Internet! The Small Business Web is here. http://thesmallbusinessweb.com&#8221;. That&#8217;s actually super easy to do. The markup:</p>
<p><code class="block">&lt;p id=&quot;tweet-it&quot;&gt;&lt;a href=&quot;http://twitter.com/home?status=<br />
&nbsp;&nbsp;Small+businesses+are+taking+over+the+Internet!+The+Small+Business+Web+is+here.+<br />
&nbsp;&nbsp;http://thesmallbusinessweb.com&quot;&gt;Tweet this page&lt;/a&gt;&lt;/p&gt;</code></p>
<p>(I&#8217;ve added line breaks for cleanliness.) Basically, the hardest part is typing a &#8220;+&#8221; instead of a space.</p>
<p>Here&#8217;s how I styled it:</p>
<p><code class="block">p#tweet-it a { display: block; position: absolute; top: 0; left: 20px; background: #004A8D url(logos/tweet-it.png) no-repeat 4px 50%; color: #FFF; margin: 0; padding: 3px 10px 5px 44px; text-decoration: none; }<br />
p#tweet-it a:hover { background-color: #333; }</code></p>
<p>I wanted the whole blue box to be a link instead of just the text. So, I applied <code>display:block</code> to the link. Next, I absolutely positioned the link to it sticks to the top of the page. That&#8217;s where the <code>top: 0</code> comes in. I added some space to the left, hence the <code>left: 20px</code>. </p>
<p>Next is the background. This encompasses the color (<code>#004A8D</code>), the birdie graphic [<code>url(logos/tweet-it.png)</code>] and the positioning (<code>4px</code> from the right of the box, <code>50%</code> vertical positioning within the box). And of course, we don&#8217;t want the bird to repeat, so <code>no-repeat</code>. Then, I set text color and padding and yanked the underline from the link. The hover state simply changes the background from blue to gray. Pow, yer done.</p>
<h2>&#8220;Business card&#8221; footer</h2>
<p>Seriously, aren&#8217;t they cute? Here&#8217;s the markup on one of those little guys:</p>
<p><code class="block">&lt;dl id=&quot;shah&quot; class=&quot;vcard&quot;&gt;<br />
&nbsp;&nbsp;&lt;dt class=&quot;fn&quot;&gt;Sunir Shah&lt;/dt&gt;<br />
&nbsp;&nbsp;&lt;dd class=&quot;title&quot;&gt;Chief Handshaker&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;dd&gt;&lt;a class=&quot;url org&quot; href=&quot;http://freshbooks.com&quot;&gt;FreshBooks&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;dd&gt;&lt;a class=&quot;email&quot; href=&quot;mailto:sunir@freshbooks.com&quot;&gt;sunir@freshbooks.com&lt;/a&gt;&lt;/dd&gt;<br />
&lt;/dl&gt;</code></p>
<p>Yes, Microformats! This is the perfect case to use hCard—and it&#8217;s so easy. Each business card gets it&#8217;s own &#8220;vcard&#8221; class (that&#8217;s the class that says &#8220;hey, everything inside this element is one set of contact information&#8221;). </p>
<p>If you&#8217;re not familiar building an hCard, it&#8217;s all about applying the right class names to certain bits of data. Definition lists are great for this because you can basically throw a class on any single definition. The &#8220;fn&#8221; class means &#8220;full name&#8221;. The &#8220;title&#8221; class means &#8220;job title&#8221; while &#8220;org&#8221; means &#8220;organization&#8221;, or company that the person works for. I doubled up &#8220;org&#8221; and &#8220;url&#8221;, applying both classes to a link. That&#8217;s because the text that is hyperlinked is the org and the href is the url for that org. A two-fer!</p>
<p>Finally, the &#8220;email&#8221; applies to &#8220;email address&#8221;. I could have hyperlinked Sunir&#8217;s name with his email address using the same process above (<code>&lt;a class=&quot;fn email&quot; href=&quot;mailto:sunir@freshbooks.com&quot;&gt;Sunir Shah&lt;/a&gt;</code>), but in this case I wanted the email address visible (like a business card!).</p>
<p>That was fun. Let&#8217;s style it:</p>
<p><code class="block">div#contacts dl { border-top: 1px solid #CCC; border-left: 2px solid #CCC; border-right: 2px solid #CCC; border-bottom: 6px solid #CCC; float: left; padding: 5px 5px 5px 52px; margin: 0 1% 0 0; }<br />
div#contacts dt { font-weight: bold; }<br />
div#contacts dd { font-size: 85%; margin: 0; padding-top: 2px; }<br />
div#contacts dl#shah { width: 11%; background: #FFF url(photos/shah.jpg) no-repeat 5px 7px; }</code></p>
<p>Each definition list (each business card) gets these fancy borders set, is floated left (so they all line up nicely), and gets some internal padding. The padding-left is set to <code>52px</code> to accommodate our 40px thumbnail images. There&#8217;s a <code>1%</code> margin-right to give them a bit of breathing room.</p>
<p>Next, we simply bold the definition term (in this case the person&#8217;s name). Each definition (bit of contact info) is set to <code>85%</code> with a bit of padding on top. Finally, each definition list is given it&#8217;s own thumbnail image thanks to the unique ID. I also gave each list a unique width (since some names are short and others are much longer). </p>
<p>So, there you have it—a new portfolio piece and a couple little markup &#038; style examples. I&#8217;m curious what you think of <a href="http://thesmallbusinessweb.com/">the page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/04/20/new-portfolio-addition-the-small-business-web/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Stop iPhone from (Incorrectly) Auto-Linking Phone Numbers</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/03/31/stop-iphone-from-incorrectly-auto-linking-phone-numbers/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/03/31/stop-iphone-from-incorrectly-auto-linking-phone-numbers/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 01:50:03 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Markup]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=643</guid>
		<description><![CDATA[One of the many nice features of iPhone is that Mobile Safari will auto-detect any phone numbers on a web page and turn them into links. Very handy. Much better than remembering the number as you switch from the browser to the phone.
However, this auto-detection is a bit overzealous. In addition to phone numbers, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>One of the many nice features of iPhone is that Mobile Safari will auto-detect any phone numbers on a web page and turn them into links. Very handy. Much better than remembering the number as you switch from the browser to the phone.</p>
<p>However, this auto-detection is a bit overzealous. In addition to phone numbers, I&#8217;ve seen it link date ranges (1978-2008), specific dates (3/9/2009), and—for <a href="http://baseballtwit.com/">us baseball stat geeks</a>—offensive rate statistics (.312/.418/.515&#8230; and I&#8217;ll send a <a href="http://batchblue.com/">BatchBlue</a> tee shirt to the first person to identify that sweet career line).</p>
<p>Tonight, I was building a page and tested it in iPhone. It incorrectly linked some dates. This was problematic because in that specific section, I had all anchors set to <code>display: block;</code>. So, adding these extra links broke the design. </p>
<p>I could have added some extraneous markup and worked around it, but I was curious if there was a way to turn off this auto-detection. Turns out, <a href="http://www.raizlabs.com/blog/?p=202">there is</a>.</p>
<p>In your <code>&lt;head&gt;</code>, add this line:</p>
<p><code class="block">&lt;meta name=&quot;format-detection&quot; content=&quot;telephone=no&quot; /&gt;</code></p>
<p>That will turn off ALL phone number auto-detection on that page. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/03/31/stop-iphone-from-incorrectly-auto-linking-phone-numbers/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Emphasized Links: What comes first, the a or the strong?</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/03/06/emphasized-links-what-comes-first-the-a-or-the-strong/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/03/06/emphasized-links-what-comes-first-the-a-or-the-strong/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 03:13:22 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Markup]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=593</guid>
		<description><![CDATA[It all started quite harmlessly. I was working on a couple new pages and realized I&#8217;d never given much thought to how I handled the occasional bold link. Now, these isn&#8217;t presentational bold. I actually wanted to use emphasis on the words that are linked. We&#8217;re talking &#60;strong&#62;, not &#60;b&#62;, folks.
I tweeted:
When you place strong [...]]]></description>
			<content:encoded><![CDATA[<p>It all started quite harmlessly. I was working on a couple new pages and realized I&#8217;d never given much thought to how I handled the occasional bold link. Now, these isn&#8217;t presentational bold. I actually wanted to use emphasis on the words that are linked. We&#8217;re talking <code>&lt;strong&gt;</code>, not <code>&lt;b&gt;</code>, folks.</p>
<p>I tweeted:</p>
<blockquote cite="http://twitter.com/adarowski/status/1291230627"><p>When you place strong emphasis on a link, do you put the <code>&lt;strong&gt;</code> inside the <code>&lt;a&gt;</code> or the <code>&lt;a&gt;</code> inside the <code>&lt;strong&gt;</code>? I think I&#8217;m inconsistent.</p></blockquote>
<p>I had been putting the the <code>&lt;a&gt;</code> <strong>outside</strong> of the <code>&lt;strong&gt;</code>. Like this:</p>
<p><code>&lt;a href=&quot;http://mailchimp.com/&quot;&gt;&lt;strong&gt;MailChimp&lt;/strong&gt;&lt;/a&gt;</code></p>
<p>My reasoning was that if you take away the link, I would still want the phrase to be emphasized.</p>
<p>However, <a href="http://mattgillooly.com/">Matt</a> brought up some good points. His first was that I&#8217;m linking the phrase, not the emphasis. I can buy that. Also, he brought up the point that putting the <code>&lt;strong&gt;</code> outside is cleaner for semantic web scraping stuff.</p>
<p>I assumed this was minor and no big deal. But I&#8217;m happy to see that <a href="http://twitter.com/kirbyt/status/1291350559">there</a> <a href="http://twitter.com/chrisbloom7/status/1291354478">are</a> <a href="http://twitter.com/wrycoder/status/1291365443">others</a> who also care about this stuff. So, what do you do? What&#8217;s your reasoning?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/03/06/emphasized-links-what-comes-first-the-a-or-the-strong/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Markup is Beautiful (.com)</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/02/28/markup-is-beautiful-com/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/02/28/markup-is-beautiful-com/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 04:22:39 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=572</guid>
		<description><![CDATA[
I love CSS. But I also have always loved markup. With the new redesign here, I&#8217;m trying to give plain ol&#8217; semantic HTML (POSH) the recognition it deserves. 
Step 1 was the redesign. 
Step 2 was the purchase of MarkupIsBeautiful.com.
Step 3 is a new category on the blog—appropriately named Markup.
Step 4&#8230; some new content. I [...]]]></description>
			<content:encoded><![CDATA[<p class="image-float"><a href="http://www.flickr.com/photos/steveganz/3295751215/"><img src="http://farm4.static.flickr.com/3309/3295751215_0f49416175_m.jpg" alt="Markup is Beautiful" /></a></p>
<p>I love CSS. But I also have always loved markup. With <a href="http://www.darowski.com/tracesofinspiration/2009/02/16/markup-is-beautiful-the-darowskicom-redesign/">the new redesign here</a>, I&#8217;m trying to give plain ol&#8217; semantic HTML (POSH) the recognition it deserves. </p>
<p>Step 1 was the redesign. </p>
<p>Step 2 was the purchase of <a href="http://markupisbeautiful.com/">MarkupIsBeautiful.com</a>.</p>
<p>Step 3 is a new category on the blog—appropriately named <a href="http://www.darowski.com/tracesofinspiration/category/markup/">Markup</a>.</p>
<p>Step 4&#8230; some new content. I look forward to it.</p>
<p><em><a href="http://www.flickr.com/photos/steveganz/3295751215/">Photo</a> by <a href="http://steve.ganz.name/">Steve Ganz</a>. Steve also sees the beauty in markup.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/02/28/markup-is-beautiful-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Heart of the Redesign: CSS Pseudo-elements</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/02/22/the-heart-of-the-redesign-css-pseudo-elements/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/02/22/the-heart-of-the-redesign-css-pseudo-elements/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 17:50:01 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Darowski Dot Com]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=498</guid>
		<description><![CDATA[One of my favorite parts of my site&#8217;s recent redesign—and the page that I started the redesign with—is the new Portfolio page. This is where the whole &#8220;exposed markup&#8221; thing came from. Here&#8217;s what I&#8217;m talking about:

What was I trying to do?
I have a full-time gig as the User Experience Designer for BatchBlue. That affords [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite parts of <a href="http://www.darowski.com/tracesofinspiration/2009/02/16/markup-is-beautiful-the-darowskicom-redesign/">my site&#8217;s recent redesign</a>—and the page that I started the redesign with—is the new <a href="http://www.darowski.com/tracesofinspiration/portfolio/">Portfolio</a> page. This is where the whole &#8220;exposed markup&#8221; thing came from. Here&#8217;s what I&#8217;m talking about:</p>
<p><a href="http://www.flickr.com/photos/darowskidotcom/3296101705/" title="Adam Darowski : Portfolio by darowskidotcom, on Flickr"><img class="framed" src="http://farm4.static.flickr.com/3601/3296101705_877015d47a.jpg" width="500" height="359" alt="Adam Darowski : Portfolio" /></a></p>
<h2>What was I trying to do?</h2>
<p>I have a full-time gig as the User Experience Designer for <a href="http://batchblue.com">BatchBlue</a>. That affords me the ability to be a little creative with my portfoio—it isn&#8217;t my source of income. However, I do believe that all <a href="http://www.darowski.com/tracesofinspiration/2008/11/03/full-time-designers-should-do-some-side-work/">full-time designers should do a little freelance</a> to stay fresh. So, I&#8217;d still like to show what I&#8217;m about.</p>
<p>The design traits I want to convey to prospective clients and readers are simplicity, elegance, cleanliness, and a sharp attention to detail. I also want to communicate that markup and style are at the heart of what I do. I do a lot of different things, but I&#8217;m always happiest with a text editor, a web browser, and a refresh button.</p>
<p>Given all this background, my goal was to work the underlying markup into the visual design. </p>
<h2>How&#8217;d I do it?</h2>
<p>Since the &#8220;exposed markup&#8221; is merely presentational, I wanted to keep it out of the &#8220;real&#8221; markup. Basically, when you &#8220;View Source&#8221;, I don&#8217;t want you to see <code>&lt;h1&gt;&amp;lt;h1&amp;gt;Portfolio&amp;lt;/h1&amp;gt;&lt;h1&gt;</code>. I wanted the nice, clean <code>&lt;h1&gt;Portfolio&lt;h1&gt;</code>. The best way I could come up with to pull this off was with <a href="http://www.w3.org/TR/CSS2/generate.html#before-after-content">the :before and :after CSS pseudo-elements</a>.</p>
<p>Huh, pseudo-elements? Pseudo-elements are added to CSS selectors to give you a bit more selection control. The four pseudo-elements are <strong>:first-letter</strong> (allows you to style the first letter of the content contained within that tag), <strong>:first-line</strong> (allows you to style the first line), <strong>:before</strong> (allows you to add content before the tag), and <strong>:after</strong> (content after the tag).</p>
<p>The :before and :after pseudo-elements are great—except for one problem. You guessed it. IE. But not just IE6. IE7 still doesn&#8217;t support them. The additional content just doesn&#8217;t show up. For my portfolio, I decided that was a fine tradeoff. I&#8217;m really not targeting the type of users who would surf the web with IE (present company excluded, of course!). Besides, this approach actually well. If you use IE, you just don&#8217;t get the &#8220;exposed markup&#8221; tags. </p>
<p>Here&#8217;s how it looks in IE7:</p>
<p><a href="http://www.flickr.com/photos/darowskidotcom/3298490587/" title="Adam Darowski | Portfolio - in IE7 by darowskidotcom, on Flickr"><img class="framed" src="http://farm4.static.flickr.com/3533/3298490587_a8218a1c2f.jpg" width="500" height="321" alt="Adam Darowski | Portfolio - in IE7" /></a></p>
<h2>The markup</h2>
<p>The pseudo-elements allow me to use a pretty standard definition list:</p>
<p><code class="block">&lt;dl id=&quot;active-projects&quot;&gt;<br />
&nbsp;&nbsp;&lt;dt&gt;&lt;a href=&quot;http://www.darowski.com/tracesofinspiration/portfolio/batchbook/&quot;&gt;BatchBook&lt;/a&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;Small Business &lt;abbr title=&quot;customer relationship manager&quot;&gt;CRM&lt;/abbr&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;For &lt;a href=&quot;http://batchblue.com/&quot;&gt;BatchBlue Software&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;May 2007&amp;ndash;Present&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;dt&gt;&lt;a href=&quot;http://www.darowski.com/tracesofinspiration/portfolio/batchblue/&quot;&gt;BatchBlue.com&lt;/a&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;Corporate Website &amp;amp; Weblog&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;For &lt;a href=&quot;http://batchblue.com/&quot;&gt;BatchBlue Software&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;May 2007&amp;ndash;Present&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;dt&gt;&lt;a href=&quot;http://www.darowski.com/tracesofinspiration/portfolio/tabigail/&quot;&gt;Tabigail&lt;/a&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;A simple, gray, one-column, socially savvy WordPress theme&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;For the WordPress community&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;December 2008&amp;ndash;Present&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;dt&gt;&lt;a href=&quot;http://www.darowski.com/tracesofinspiration/portfolio/baseballtwit/&quot;&gt;BaseballTwit&lt;/a&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;Blog posts and Twitter tweets about baseball stats and history&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;For the sabermetric community&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd&gt;December 2008&amp;ndash;Present&lt;/dd&gt;<br />
&lt;/dl&gt;</code></p>
<h2>The CSS</h2>
<p>First, we know we want the :before and :after content to always appear italicized and (my favorite color) gray. So, let&#8217;s use the global selector with the pseudo-elements. This way we don&#8217;t have to reapply the color and style over and over again.</p>
<p><code class="block">*:before, *:after { color: #CECECE; font-style: italic; }</code></p>
<p>First, we&#8217;ll expose the opening and closing <code>&lt;dl&gt;</code> tags.</p>
<p><code class="block">dl#active-projects:before { content: &#39;&lt;dl id=&quot;active-projects&quot;&gt;&#39;;  }<br />
dl#active-projects:after { content: &#39;&lt;/dl&gt; &lt;!-- close #active-projects --&gt;&#39;;  }</code></p>
<p>For the content property, you can either use a string (like I did), an image (via <code>url(image.png)</code>), or any of the following: <code>open-quote</code>, <code>close-quote</code>, <code>no-open-quote</code>, or <code>no-close-quote</code>.</p>
<p><em><strong>Update:</strong> For some reason, this wasn&#8217;t rendering properly in Safari. The closing <code>&lt;/dl&gt;</code> was appearing after the first <code>&lt;dt&gt;</code>. So, instead, I needed to wrap the <code>&lt;dl&gt;</code> in a <code>&lt;div&gt;</code> (giving the <code>&lt;div&gt;</code> the id of &#8220;active-projects&#8221; instead). This tricked Safari into putting the closing <code>&lt;/dl&gt;</code> at the end of the <code>&lt;dl&gt;</code> where it belongs. If you know why Safari does this, please let me know!</em></p>
<p>Here&#8217;s the CSS for the <code>&lt;dt&gt;</code>:</p>
<p><code class="block">dt { margin: 10px 0 10px 24px; font-size: 125%; }<br />
dt a { font-weight: bold; }<br />
dt:before { content: &#39;&lt;dt&gt;&#39;; font-size: 80%; }<br />
dt:after { content: &#39;&lt;/dt&gt;&#39;; font-size: 80%; }</code></p>
<p>In the first line, the margin gives a little space on the top and bottom, plus a proper indenting for our markup. Since the <code>&lt;dt&gt;</code> is used for the project name, I bumped the size up a bit. I also made the links bold to stand out a bit more. Then, of course, comes the :before and :after. In this case, I also dropped the font size for the tags a bit (to offset the increase in size of the links).</p>
<p>And now, the <code>&lt;dd&gt;</code>:</p>
<p><code class="block">dd { text-indent: -38px; margin-bottom: 4px; padding-left: 56px; }<br />
dd:before { content: &#39;&lt;dd&gt;&#39;;  }<br />
dd:after { content: &#39;&lt;/dd&gt;&#39;;  }</code></p>
<p>In addition to a little bit of a margin, I added a bunch of padding on the left and then used a negative text-indent. In the event that the <code>&lt;dd&gt;</code> goes to two lines, this will cause it to indent quite nicely.</p>
<p>And there you have it&#8230; pretty bits of markup used as a design element without muddying your &#8220;real&#8221; markup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/02/22/the-heart-of-the-redesign-css-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Markup is Beautiful: The Darowski.com Redesign</title>
		<link>http://www.darowski.com/tracesofinspiration/2009/02/16/markup-is-beautiful-the-darowskicom-redesign/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2009/02/16/markup-is-beautiful-the-darowskicom-redesign/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 05:38:21 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Darowski Dot Com]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=477</guid>
		<description><![CDATA[
Things look a little different around here today.
In December, when I launched the Tabigail theme, I wrote:
Since [March 2007], I’ve tweaked and refined [this site] endlessly, but still kept the basic feel of that design I did in a day over twenty months ago. While I really like the design, it’s time for a change. [...]]]></description>
			<content:encoded><![CDATA[<p class="image-float"><a href="http://www.flickr.com/photos/darowskidotcom/3283867546/" title="First screenshot after the redesign by darowskidotcom, on Flickr"><img src="http://farm4.static.flickr.com/3628/3283867546_c5bdd59f2f.jpg" width="219" height="500" alt="First screenshot after the redesign" /></a></p>
<p>Things look a little different around here today.</p>
<p>In December, when I launched the <a href="http://www.darowski.com/tracesofinspiration/2008/12/15/announcing-tabigail-a-simple-gray-one-column-socially-savvy-wordpress-theme/">Tabigail theme</a>, I wrote:</p>
<blockquote cite="http://www.darowski.com/tracesofinspiration/2008/12/15/announcing-tabigail-a-simple-gray-one-column-socially-savvy-wordpress-theme/"><p>Since [March 2007], I’ve tweaked and refined [this site] endlessly, but still kept the basic feel of that design I did in a day over twenty months ago. While I really like the design, it’s time for a change. So, what better way to archive the design than releasing it as a WordPress theme?</p></blockquote>
<p>So, I had publicly tasked myself with a redesign. Today, I&#8217;m launching it. I dig it. So, what do I want to talk about?</p>
<ol>
<li><strong>Markup is beautiful:</strong> I love markup. Like, a lot. I love it so much that I wanted to work it into the redesign. It serves many purposes. Markup is beautiful, so I think it looks good. Also, there&#8217;s <a href="http://www.darowski.com/tracesofinspiration/portfolio/">a new portfolio</a> that takes the markup-as-design-element to a new level. Not only does exposing markup on my portfolio show what&#8217;s important to me and shows I know what I&#8217;m talking about, it also weeds out prospective clients that just don&#8217;t &#8220;get it&#8221;.</li>
<li><strong>Finally, <a href="http://www.darowski.com/tracesofinspiration/portfolio/">a portfolio</a>:</strong> I&#8217;ve been told that I&#8217;m a rare designer that doesn&#8217;t have a portfolio. Now I do. I&#8217;ve only got the most recent/current projects on there right now (as you can tell by the class of the &lt;dl&gt;!), but I do love the design.</li>
<li><strong>Ignores IE6. Well, and IE7, too:</strong> Would you believe that IE7 still doesn&#8217;t support the :before and :after pseudo-elements? The markup in the design relies heavily on this (look carefully, it&#8217;s not in the source). The design degrades well in IE, of course. They just don&#8217;t get the markup at all.</li>
<li><strong>A sidebar!:</strong> The Tabigail theme had no sidebar. What I love about the sidebar in the new design is that it essentially contains a Microformats tutorial. <img src='http://www.darowski.com/tracesofinspiration/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><strong>Non-web fonts:</strong> I&#8217;m into Georgia. It&#8217;s very pretty, for a web font. But I wanted to reward the folks that may have nicer fonts installed. If you&#8217;ve got Garamond, you&#8217;ll get Garamond. If you&#8217;ve got Baskerville, you&#8217;ll get Baskerville. If you&#8217;ve got nothing, you still get Georgia.</li>
<li><strong>Gray:</strong> Yeah. I can&#8217;t help it. At least I used red for the first time!
</ol>
<p>Please let me know what you think. I&#8217;m sure it&#8217;ll keep getting tweaked. So, this is far from final. It&#8217;s just a first release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2009/02/16/markup-is-beautiful-the-darowskicom-redesign/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Announcing Tabigail: A simple, gray, one-column, socially savvy WordPress theme</title>
		<link>http://www.darowski.com/tracesofinspiration/2008/12/15/announcing-tabigail-a-simple-gray-one-column-socially-savvy-wordpress-theme/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2008/12/15/announcing-tabigail-a-simple-gray-one-column-socially-savvy-wordpress-theme/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 15:43:48 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Abby]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Darowski Dot Com]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Tabigail]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=329</guid>
		<description><![CDATA[
Like most beginners, when I first started using WordPress (in May of 2006) I used a downloadable theme. I eventually outgrew it and in March 2007 I stripped down the blog&#8217;s design to just raw HTML. Little by little, I started styling—purposely NOT working from an established design&#8230; I wanted to see where playing with [...]]]></description>
			<content:encoded><![CDATA[<p class="image-float"><a href="http://darowski.com/tabigail"><img src="http://www.darowski.com/tracesofinspiration/wp-content/uploads/2008/12/screenshot.png" alt="Tabigal screenshot" width="300" height="592" /></a></p>
<p>Like most beginners, when I first started using WordPress (in May of 2006) I used a downloadable theme. I eventually outgrew it and in March 2007 I stripped down the blog&rsquo;s design to just raw HTML. Little by little, I started styling—purposely NOT working from an established design&hellip; I wanted to see where playing with the CSS took me. I captured <a href="http://www.flickr.com/photos/darowskidotcom/414009972/sizes/o/">how it looked</a> less than 24 hours into the design.</p>
<p>Since then, I&rsquo;ve tweaked and refined endlessly, but still kept the basic feel of that design I did in a day over twenty months ago. While I really like the design, it&rsquo;s time for a change. So, what better way to archive the design than releasing it as a WordPress theme?</p>
<p>I&rsquo;m calling it <strong>Tabigail</strong>.</p>
<p>Why Tabigail? One of the features of the design was a rotating Polaroid-style photo in the header. I&rsquo;d change it every so often. However, the last time I changed it was December 15, 2007&mdash;one year ago today. That was the day we had to put our beloved kitty, <a href="http://www.darowski.com/tracesofinspiration/2007/12/15/well-miss-you-abby/">Abby</a> (or <em>Abigail the Tabigail</em>), to sleep. I never could make myself swap out the image of Abby.</p>
<p>I&#8217;ve built a new page specifically for the <a href="http://darowski.com/tabigail">Tabigail theme</a>. You download the theme there and I&#8217;ve also posted setup and customization tips that allow you to make the theme more &#8220;you&#8221;. On that page, I briefly wrote about what makes Tabigail a compelling WordPress theme:</p>
<blockquote><ol>
<li><strong>So super simple.</strong> A quick peek at the CSS will show you that there&rsquo;s really not a ton here beyond plain HTML.</li>
<li><strong>No sidebar.</strong> You know those annoying over-crowded sidebars so many blogs have? This theme has NO sidebar.</li>
<li><strong>Socially savvy.</strong> The footer features a list of links to your social networking profiles. Because, really&hellip; it&rsquo;s not all about your blog anymore. Plus, these links are marked up in an <a href="http://microformats.org/wiki/hcard">hCard</a> with <code>rel=me</code> (just planning for the future!).</li>
</ol>
</blockquote>
<p>Just a note on that last one&#8230; what&#8217;s cool about that hCard with all those <code>rel=me</code> links? Well, as far as I know, nothing yet. But as the need to consolidate web identities becomes more mainstream, Tabigail will be ready to tell any service provider where all your social media identities are located.</p>
<p>Dude, you&#8217;re future-proof!</p>
<p>So, please&#8230; <a href="http://darowski.com/tabigail">take a look</a>, download the theme, and leave a comment letting me know what you think. This is my very first WordPress theme (well, publicly available one anyway&#8230; I&#8217;ve done a ton)&#8230; I&#8217;m hoping somebody finds value in it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2008/12/15/announcing-tabigail-a-simple-gray-one-column-socially-savvy-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My Favorite CSS Techniques</title>
		<link>http://www.darowski.com/tracesofinspiration/2008/11/14/my-favorite-css-techniques/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2008/11/14/my-favorite-css-techniques/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 18:11:55 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[BatchBlue]]></category>
		<category><![CDATA[BatchBook]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=267</guid>
		<description><![CDATA[I&#8217;ve been creating websites for 12 years. I started using CSS many years ago, but for a long time (like many designers) I only used it for text formatting. It wasn&#8217;t until 2006 that I took the plunge into pure CSS for layout. Since then, I&#8217;ve developed some favorite techniques that I use over and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been creating websites for 12 years. I started using CSS many years ago, but for a long time (like many designers) I only used it for text formatting. It wasn&#8217;t until 2006 that I took the plunge into pure CSS for layout. Since then, I&#8217;ve developed some favorite techniques that I use over and over again. Here, I&#8217;m finally putting them in one place. </p>
<p>These techniques don&#8217;t require any acrobatic wizardry or anything. They mirror my design approach—simple, clear, minimal, and (hopefully) easy to follow. It is because of this approach that my cross-browser fixes are usually quite minimal. That&#8217;s why you won&#8217;t see many IE tweaks here.</p>
<p>Before I start&#8230;</p>
<h2>How did I learn CSS?</h2>
<p>I&#8217;ve only picked up a few CSS books over the years, but I&#8217;ve leaned on those books <em>heavily</em>. They are:</p>
<ul>
<li><a href="http://simplebits.com/publications/solutions/"><em>Web Standards Solutions: The Markup and Style Handbook</em></a> by Dan Cederholm</li>
<li><a href="http://simplebits.com/publications/bulletproof/"><em>Bulletproof Web Design</em></a> (1st edition) by Dan Cederholm</li>
<li><a href="http://htmlmastery.com/"><em>HTML Mastery</em></a> by Paul Haine</li>
<li><a href="http://www.cssmastery.com/"><em>CSS Mastery</em></a> by Andy Budd</li>
</ul>
<p>What? No <a href="http://www.zeldman.com/dwws/">Zeldman</a>? I know, I know. I started with the local protégé, Mr. Cederholm. He&#8217;s taken me far.</p>
<p>Of course, I also read a ton of web design blogs and online publications. The key ones (for me) are:</p>
<ul>
<li><a href="http://simplebits.com/">SimpleBits</a> (Dan Cederholm)</li>
<li><a href="http://www.456bereastreet.com/">456 Berea Street</a> (Roger Johansson)</li>
<li><a href="http://www.alistapart.com/">A List Apart</a></li>
<li><a href="http://www.thinkvitamin.com/">Vitamin</a></li>
<li>Email list from the <a href="http://webstandardsgroup.org/">Web Standards Group</a></li>
</ul>
<p>Now that you know how I learned to do this, here&#8217;s what I find myself using over and over again:</p>
<h2>Image Replacement on Headers</h2>
<p>Headers (<code>h1</code>, <code>h2</code>, etc.) are very, very important. For starters, search engines <strong>love</strong> them. When Google crawls your page, it first asks &#8220;Okay, where&#8217;s the <code>h1</code>? That will tell me what this page is.&#8221; If you don&#8217;t include headers, then you&#8217;re making Google guess. Why make Google guess?</p>
<p>This is what the <code>h1</code> of Darowski.com looks like:</p>
<p><code>&lt;h1&gt;&lt;a href="http://www.darowski.com/tracesofinspiration"&gt;Adam Darowski&rsquo;s Traces of Inspiration&lt;/a&gt;&lt;/h1&gt;</code></p>
<p>And here&#8217;s how it renders with no CSS:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/imagereplacement1.png" alt="h1 with no styling" /></p>
<p>Of course, that just ain&#8217;t gonna do. Here&#8217;s how it renders with the rest of the design:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/imagereplacement2.png" alt="h1 styled and integrated with design" /></p>
<p>So, how do you do that? With image replacement. We&#8217;re taking the <code>h1</code>, then giving it a background image and height &#038; weight (using the dimensions from the background image). For the text itself, we give it a negative indent so that the text doesn&#8217;t appear on the page. It&#8217;s still there for screen readers and search engines, but the typical user won&#8217;t see it.</p>
<p>Here&#8217;s the CSS:</p>
<p><code class="block">h1 {<br />
&nbsp;&nbsp;margin: 0;<br />
}<br />
h1 a {<br />
&nbsp;&nbsp;display: block;<br />
&nbsp;&nbsp;background: url(darowski.png) no-repeat 0 0;<br />
&nbsp;&nbsp;height: 103px;<br />
&nbsp;&nbsp;width: 449px;<br />
&nbsp;&nbsp;text-indent: -9999px;<br />
}<br />
</code></p>
<p>Why is most of the code applied to the link inside the h1? Because if you apply the negative indent to the text <em>inside</em> the <code>h1</code>, the clickable link actually appears off the page. If you indent the text inside the clickable link, the link itself still appears on the page—only the text inside is hidden. I know, weird. But it works!</p>
<h2>Implementing types and values using Microformats</h2>
<p>Using <a href="http://microformats.org/">Microformats</a> to mark up an email address is pretty easy.</p>
<p><code>&lt;a href="mailto:adarowski@gmail.com"&gt;adarowski@gmail.com&lt;/a&gt;</code></p>
<p>becomes:</p>
<p><code>&lt;a class="email" href="mailto:adarowski@gmail.com"&gt;adarowski@gmail.com&lt;/a&gt;</code></p>
<p>And that&#8217;s it.</p>
<p>But what if you want to add more information to that email address, like if it is a home or work email address? In that case, inside of the object with the class of &#8220;email&#8221;, you need two more objects: one with the class name of &#8220;type&#8221; and another with the class name of &#8220;value&#8221;. The &#8220;type&#8221; is where you define home or work while &#8220;value&#8221; is the actual email address.</p>
<p>Here&#8217;s an example from my <a href="http://www.darowski.com/tracesofinspiration/about/">About page</a>:</p>
<p><code class="block">&lt;p&gt;Work Info:&lt;/p&gt;<br />
&lt;ul&gt;<br />
&nbsp;&nbsp;&lt;li&gt;Website: &lt;a href="http://batchblue.com/" class="url"&gt;http://batchblue.com/&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li&gt;Blog: &lt;a href="http://darowski.com/" class="url"&gt;http://blog.batchblue.com/&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li class="email"&gt;&lt;span class="type hidetext"&gt;Work&lt;/span&gt; Email: &lt;a href="mailto:adarowski@batchblue.com" class="value"&gt;adarowski@batchblue.com&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li class="tel"&gt;&lt;span class="type hidetext"&gt;Work&lt;/span&gt; Phone: &lt;span class="value"&gt;(888) 402-2824&lt;/span&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
</code></p>
<p>So, inside the <code>li</code> (which has the &#8220;email&#8221; class) lives two <code>span</code>s—one &#8220;type&#8221; and one &#8220;value&#8221;. The HTML renders like so with no CSS:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/microformatstype1.png" alt="markup with microformats and no CSS" /></p>
<p>But you&#8217;ll notice that in this case, I have a &#8220;hidetext&#8221; style on the &#8220;type&#8221;. That&#8217;s because I only want to display it as &#8220;Email&#8221;. I simply add this style:</p>
<p><code>span.hidetext {<br />
&nbsp;&nbsp;display: none;<br />
}<br />
</code></p>
<p>and I&#8217;m done. It renders like so:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/microformatstype2.png" alt="Microformatted markup with CSS to hide type" /></p>
<p>I don&#8217;t always hide the types, though. On <a href="http://flickr.com/photos/batchbluesoftware/2906686850/sizes/o/in/set-72157607657016965/">BatchBook&#8217;s contact detail pages</a>, the type works very well into the layout:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/microformatstype3.png" alt="Microformat types for email addresses works into BatchBook's UI nicely" /></p>
<h2>Custom icons on list items</h2>
<p>Here&#8217;s one I use A LOT. Unordered lists are wonderful. I use them all the time. But that bullet that denotes an unordered list by default can be a bit boring. Here&#8217;s what I did to spruce up the bloggers list on the <a href="http://blog.batchblue.com/">BatchBlue Blog</a>:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/customlists1.png" alt="BatchBlue Blog blogger list with icons or each list item" /></p>
<p>And here&#8217;s the markup:</p>
<p><code class="block">&lt;h2&gt;Bloggers&lt;/h2&gt;<br />
&lt;ul id="bloggers"&gt;<br />
&nbsp;&nbsp;&lt;li id="calhoun"&gt;&lt;a href="http://blog.batchblue.com/?author=6" title="Archive for Keri Calhoun"&gt;Keri Calhoun&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="darowski"&gt;&lt;a href="http://blog.batchblue.com/?author=5" title="Archive for Adam Darowski"&gt;Adam Darowski&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="larson"&gt;&lt;a href="http://blog.batchblue.com/?author=8" title="Archive for Will Larson"&gt;Will Larson&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="ohara"&gt;&lt;a href="http://blog.batchblue.com//?author=4" title="Archive for Pamela O'Hara"&gt;Pamela O'Hara&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="ransom"&gt;&lt;a href="http://blog.batchblue.com/?author=1" title="Archive for Sean Ransom"&gt;Sean Ransom&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="riggen"&gt;&lt;a href="http://blog.batchblue.com/?author=2" title="Archive for Michelle Riggen-Ransom"&gt;Michelle Riggen-Ransom&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li id="sweeney"&gt;&lt;a href="http://blog.batchblue.com/?author=7" title="Archive for Stephanie Sweeney"&gt;Stephanie Sweeney&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
</code></p>
<p>As you can see, we gave the list an id of &#8220;bloggers&#8221; and each list item an id of the blogger&#8217;s last name. That allows us to apply a different icon to each blogger&#8217;s list item.</p>
<p>But first, here&#8217;s the CSS to get the list looking the way we want (correct padding, left indenting, removing the default bullet):</p>
<p><code class="block">ul#bloggers {<br />
&nbsp;&nbsp;margin: 0;<br />
&nbsp;&nbsp;list-style: none;<br />
}<br />
ul#bloggers li {<br />
&nbsp;&nbsp;padding: 4px 0;<br />
&nbsp;&nbsp;margin: 1px;<br />
&nbsp;&nbsp;padding-left: 24px;<br />
}<br />
ul#bloggers li a {<br />
&nbsp;&nbsp;text-decoration: none;<br />
}<br />
</code></p>
<p>Next, here is the CSS for each of the individual line items:</p>
<p><code class="block">#calhoun { background: url(../images/keri-calhoun-icon.jpg) no-repeat left 2px; }<br />
#darowski { background: url(../images/adam-darowski-icon.jpg) no-repeat left 2px; }<br />
#larson { background: url(../images/will-larson-icon.jpg) no-repeat left 2px; }<br />
#ohara { background: url(../images/pamela-ohara-icon.jpg) no-repeat left 2px; }<br />
#ransom { background: url(../images/sean-ransom-icon.jpg) no-repeat left 2px; }<br />
#riggen { background: url(../images/michelle-riggen-ransom-icon.jpg) no-repeat left 2px; }<br />
#sweeney { background: url(../images/stephanie-sweeney-icon.jpg) no-repeat left 2px; }<br />
</code></p>
<p>If you look around any site I&#8217;ve created, you&#8217;ll probably see a lot of these. The footer at Darowski.com uses it:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/customlists2.png" alt="Darowski.com footer with custom icons on list items" /></p>
<h2>Creative use of definition lists</h2>
<p>As much as I love unordered lists, there&#8217;s one thing I love more. Definition lists!</p>
<p>I admit, I had never even used one before reading <em>Web Standards Solutions</em>, but now I use them all the time. All contact info within BatchBook is laid out in definition lists. Think about it&#8230; what better defines the home email than the email address itself? The definition list is an unordered list with even more semantic meaning.</p>
<p>When we launched the new personas section of <a href="http://www.batchblue.com/">BatchBlue.com</a>, I went with a definition list. The names of the personas are the definition terms (<code>dt</code>) and the person used in the persona as well as the information that person is likely to track help define it (<code>dd</code>).</p>
<p>Here&#8217;s the complete markup:</p>
<p><code class="block">&lt;h3 class="persona-header"&gt;Who needs a CRM anyway?&lt;/h3&gt;<br />
&lt;div id="personas" class="clearfix"&gt;<br />
&nbsp;&nbsp;&lt;dl class="sales"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Sales professionals&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Peter Caputa" href="http://www.linkedin.com/in/pc4media" target="_blank"&gt;PC4Media.net&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Customers, &lt;span&gt;leads,&lt;/span&gt; conversions&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="freelancers"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Freelancers&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Alex Taylor" href="http://bigringdesign.com/" target="_blank"&gt;Big Ring Design&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Clients, &lt;span&gt;partnerships,&lt;/span&gt; invoices &hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="virtalassistants"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Virtual assistants&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Michelle Wolverton" href="http://chelpixie.com/" target="_blank"&gt;ChelPixie&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;To-dos, &lt;span&gt;schedules,&lt;/span&gt; executives&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="entrepreneurs"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Entrepreneurs&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Jack Templin" href="http://thoughtcap.com/" target="_blank"&gt;ThoughtCap&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Opportunities, &lt;span&gt;partners,&lt;/span&gt; VCs&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="editors"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Editors&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Anisa Raoof" href="http://kidoinfo.com" target="_blank"&gt;KidoInfo&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Writers, &lt;span&gt;deadlines,&lt;/span&gt; articles&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="consultants"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Consultants&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Brent Leary" href="http://www.brentleary.com/" target="_blank"&gt;CRM Essentials&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Clients, &lt;span&gt;vendors,&lt;/span&gt; proposals&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="eventorganizers"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Event organizers&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Chris Brogan" href="http://chrisbrogan.com/" target="_blank"&gt;Chris Brogan&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Speakers, &lt;span&gt;attendees,&lt;/span&gt; sponsors&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="nonprofits"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Non-Profits&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Danielle Brigida" href="http://www.nwf.org/wildlife/" target="_blank"&gt;National Wildlife Federation&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Donors, &lt;span&gt;fundraisers,&lt;/span&gt; volunteers&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="realestateagents"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Real estate agents&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Gerry Bourgeois" href="http://realtyman.com/" target="_blank"&gt;RealtyMan.com&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Buyers, &lt;span&gt;sellers,&lt;/span&gt; referrals&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="custom"&gt;&lt;a href="realestate/"&gt;Custom version available&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="designers"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Designers&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Mikey Hougland" href="http://lamikey.com/" target="_blank"&gt;lamikey.com&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Projects, &lt;span&gt;clients,&lt;/span&gt; deliverables&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="custom"&gt;&lt;a href="designer/"&gt;Custom version available&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="marketers"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Marketers&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Saul Colt" href="http://saulcolt.com" target="_blank"&gt;Saul Colt&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;Press, &lt;span&gt;bloggers,&lt;/span&gt; social media&hellip;&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&nbsp;&nbsp;&lt;dl class="superheroes"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dt&gt;Super Heroes&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="photo"&gt;&lt;a title="Small Business Super Heroes" href="super-heroes.html"&gt;Super Heroes&lt;/a&gt;&lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;dd class="track"&gt;We know &lt;span&gt;you&rsquo;re out&lt;/span&gt; there!&lt;/dd&gt;<br />
&nbsp;&nbsp;&lt;/dl&gt;<br />
&lt;/div&gt; &lt;!-- close #personas --&gt;<br />
</code></p>
<p>An abbreviated version of how that looks unstyled:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/personas1.png" alt="Unstyled personas box" /></p>
<p>And here&#8217;s how I got that to look:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/personas2.png" alt="Styled personas box" /></p>
<p>I&#8217;ll admit&#8230; I&#8217;m a bit proud of that one. <img src='http://www.darowski.com/tracesofinspiration/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, the CSS. There&#8217;s a lot of it. Let&#8217;s start with the basic definition list:</p>
<p><code class="block">#personas {<br />
&nbsp;&nbsp;border-top: 1px solid #CACACA;<br />
&nbsp;&nbsp;border-left: 1px solid #CACACA;<br />
&nbsp;&nbsp;margin-bottom: 10px;<br />
&nbsp;&nbsp;width: 688px;<br />
}<br />
#personas dl {<br />
&nbsp;&nbsp;float: left;<br />
&nbsp;&nbsp;width: 163px;<br />
&nbsp;&nbsp;padding: 4px;<br />
&nbsp;&nbsp;border-bottom: 1px solid #CACACA;<br />
&nbsp;&nbsp;border-right: 1px solid #CACACA;<br />
&nbsp;&nbsp;margin: 0;<br />
}<br />
#personas dt {<br />
&nbsp;&nbsp;font-family: Georgia,serif;<br />
&nbsp;&nbsp;font-size: 120%;<br />
&nbsp;&nbsp;color: #004A8D;<br />
&nbsp;&nbsp;padding-bottom: 2px;<br />
}<br />
#personas dd {<br />
&nbsp;&nbsp;margin: 0;<br />
}<br />
</code></p>
<p>So, the whole thing is in a div (with an id of &#8220;personas&#8221;) that has a top and left 1-pixel border. The reason I did this is the individual definition lists inside the div will have bottom and right borders. That means we don&#8217;t have any double borders on any side.</p>
<p>Above, I&#8217;ve also set the width for each <code>dl</code> and floated it. The <code>dt</code> simply has some text formatting while the <code>dd</code> has its margin eliminated.</p>
<p>Here&#8217;s some more styling done to the definitions:</p>
<p><code class="block">#personas dd.track {<br />
&nbsp;&nbsp;color: #666;<br />
&nbsp;&nbsp;font-family: Georgia, serif;<br />
&nbsp;&nbsp;font-style: italic;<br />
&nbsp;&nbsp;font-size: 110%;<br />
&nbsp;&nbsp;line-height: 120%;<br />
}<br />
#personas dd.track span {<br />
&nbsp;&nbsp;display: block;<br />
}<br />
#personas dd.custom {<br />
&nbsp;&nbsp;font-size: 80%;<br />
&nbsp;&nbsp;margin-top: 3px;<br />
&nbsp;&nbsp;padding-left: 22px;<br />
&nbsp;&nbsp;background-position: left 50%;<br />
}<br />
#personas dd.custom a:link,<br />
#personas dd.custom a:visited,<br />
#personas dd.custom a:hover,<br />
#personas dd.custom a:active {<br />
&nbsp;&nbsp;color: #F88C17;<br />
&nbsp;&nbsp;text-decoration: none;<br />
}<br />
#personas dd.custom a:hover {<br />
&nbsp;&nbsp;color: #F88C17;<br />
&nbsp;&nbsp;text-decoration: underline;<br />
}<br />
#personas dl.realestateagents dd.custom {<br />
&nbsp;&nbsp;background: url(../images/icon-realestate.png) no-repeat;<br />
}<br />
#personas dl.designers dd.custom {<br />
&nbsp;&nbsp;background: url(../images/icon-designer.png) no-repeat;<br />
}<br />
#personas dl.designers,<br />
#personas dl.realestateagents,<br />
#personas dl.marketers,<br />
#personas dl.superheroes {<br />
&nbsp;&nbsp;min-height: 95px;<br />
}<br />
</code></p>
<p>First, we are styling the text of the &#8220;track&#8221; definition (that&#8217;s the one we use to explain what each persona will track). I threw a very non-semantic <code>span</code> on the middle item in each of those. The reason I did that is so I could make it display as block (force it to a new line) to make sure they all line up the same. </p>
<p>A couple items in the bottom row have another definition with the class &#8220;custom&#8221;. This is to denote we have a custom version of BatchBook for this persona. First, I adjust the font size, margin, and padding. Then, I set the background position of the icons (in the same manner as explained above). Next, I set the link styles. Then, I set the background images for the Real Estate and Designers version. If you&#8217;re a designer, you just may find <a href="http://www.batchblue.com/designer/">BatchBook for Designers</a> handy. <img src='http://www.darowski.com/tracesofinspiration/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Finally, I set the minimum height of the bottom row to make room for that &#8220;custom&#8221; style, even if it isn&#8217;t there. That way the boxes all line up on the bottom. <em>(I realize this isn&#8217;t completely bulletproof, but these boxes will all have the exact same text in them so box height is easier to plan for.)</em></p>
<p>Finally, we have the thumbnail photos, which I&#8217;m actually going to cover in the next technique.</p>
<h2>CSS sprites</h2>
<p>I&#8217;ve recently been turned on to the wonder that is <a href="http://www.alistapart.com/articles/sprites/">CSS Sprites</a>. What are they? Well, for examples like the personas box above, I&#8217;d need to call 12 graphics. Instead of creating twelve graphics, I&#8217;ve created one that looks like this:</p>
<p><img src="http://www.darowski.com/tracesofinspiration/techniques/personas.jpg" alt="Personas CSS sprites file" /></p>
<p>Now, I just call the same graphic and only expose part of it, depending which persona it is. Sure, the file is bigger, but calling one image and caching it is a LOT easier on the server than fetching twelve smaller images. </p>
<p>And this is only a small example. Every button in BatchBook is now in one single graphic file (it&#8217;s pretty darn big). I just call that one graphic and adjust the background position.</p>
<p>So, here&#8217;s how the CSS works for the personas table. First, here&#8217;s how we style each photo:</p>
<p><code class="block">#personas dd.photo a {<br />
&nbsp;&nbsp;float: left;<br />
&nbsp;&nbsp;display: block;<br />
&nbsp;&nbsp;height: 45px;<br />
&nbsp;&nbsp;width: 45px;<br />
&nbsp;&nbsp;text-indent: -9999px;<br />
&nbsp;&nbsp;background: url(../images/personas.jpg) no-repeat;<br />
&nbsp;&nbsp;margin-top: 3px;<br />
&nbsp;&nbsp;margin-right: 8px;<br />
}<br />
</code></p>
<p>So, we float it, set a height &#038; width, indent the text (like covered earlier), set a background image, and give it some margins. Right now, we&#8217;re calling the same image and position for each. Here&#8217;s how we adjust the positioning for each photo:</p>
<p><code class="block">#personas dl.sales dd.photo a { background-position: 0 0; }<br />
#personas dl.freelancers dd.photo a { background-position: -45px 0; }<br />
#personas dl.virtalassistants dd.photo a { background-position: -90px 0; }<br />
#personas dl.entrepreneurs dd.photo a { background-position: -135px 0; }<br />
#personas dl.editors dd.photo a { background-position: -180px 0; }<br />
#personas dl.consultants dd.photo a { background-position: -225px 0; }<br />
#personas dl.eventorganizers dd.photo a { background-position: -270px 0; }<br />
#personas dl.nonprofits dd.photo a { background-position: -315px 0; }<br />
#personas dl.designers dd.photo a { background-position: -360px 0; }<br />
#personas dl.realestateagents dd.photo a { background-position: -405px 0; }<br />
#personas dl.marketers dd.photo a { background-position: -450px 0; }<br />
#personas dl.superheroes dd.photo a { background-position: -495px 0; }<br />
</code></p>
<p>So, with each <code>dl</code>, we change the horizontal position by 45 pixels (which makes sense, since the photos are 45 pixels wide!). If I need to add more personas, I just add them to the image, save it again, and add a few lines to the CSS. Done!</p>
<h2>Auto-clearing with .clearfix</h2>
<p>I use this one all the time, too—including in the personas example above. Say you&#8217;ve got a <code>div</code> and you put two elements in it. You float one left and float the other right. You need to clear that <code>div</code> so everything lines up correctly under it and nothing crashes together. </p>
<p>You could make sure the element after it uses a <code>clear: both;</code> style. But, you&#8217;d have to remember to put that in every single time. And what if you insert something in between them? It breaks. It is much cleaner to get the divs to clear themselves.</p>
<p>You can do with using the <a href="http://csscreator.com/?q=attributes/containedfloat.php">clearfix class</a>. Here&#8217;s how it looks:</p>
<p><code class="block">.clearfix:after {<br />
&nbsp;&nbsp;content: ".";<br />
&nbsp;&nbsp;display: block;<br />
&nbsp;&nbsp;height: 0;<br />
&nbsp;&nbsp;clear: both;<br />
&nbsp;&nbsp;visibility: hidden;<br />
}<br />
</code></p>
<p>Now, &#8220;after&#8221; the element with the class &#8220;clearfix&#8221;, it will render a &#8220;.&#8221;, display it as block (forcing a new line), set the height to &#8220;0&#8243; (I believe this is to make Firefox behave), hide it, and—of course—clear both!</p>
<p>In your IE6 and IE7 stylesheets, you&#8217;ll just have to add this:</p>
<p><code>.clearfix { height: 1%; }</code></p>
<p>That will trigger &#8220;hasLayout&#8221;. I&#8217;m not even going to try to explain hasLayout. I&#8217;ll leave it to <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">this guy</a>.</p>
<h2>Font sizing: keywords &#038; percentages</h2>
<p>One of the first things you need to decide when you design a site with CSS is how you&#8217;re going to size your text. You&#8217;ve got (essentially) three options:</p>
<ul>
<li>Pixels (px)</li>
<li>Ems (em)</li>
<li>Keywords (small, medium, large, etc.)</li>
</ul>
<p>Pixels are fine for sizing text. It&#8217;s probably what you&#8217;re used to. But, there&#8217;s a problem. </p>
<p>It is quite common for users to increase the size of text on web pages. Let&#8217;s face it, a lot of sites are built by 20somethings with perfect eyesight. I wouldn&#8217;t be able to read many sites I created in college. I&#8217;m among those that will bump up the font size on sites occasionally.</p>
<p>But, as always, the problem is Internet Explorer. IE won&#8217;t adjust the size of text rendered in pixels. Kind of kills the #1 accessibility feature right there.</p>
<p>Ems are a perfectly usable workaround. But <a href="http://www.clagnut.com/blog/348/">as you can see</a>, they can be a bit difficult to grasp. I&#8217;ll be honest&#8230; I never bothered. I always thought it would be neat to create a completely em-based design so that the entire site zoomed in and out along with the text size. But now that modern browsers are replacing the text sizing option with a full-page zoom, that type of functionality is being handled by the browser. So, it&#8217;s a lot of extra work that, quite honestly, I&#8217;m glad I didn&#8217;t do.</p>
<p>So, what do I use? I use those silly keywords that come with HTML. You know&#8230; small, medium, large, etc. That&#8217;s me. Well, I actually only really use small. Because I use that as the baseline for my entire site. I then use percentages to adjust sizes accordingly.</p>
<p>First, what does it look like? I start off by establishing <code>small</code> as my baseline.</p>
<p><code>body { font-size: small; }</code></p>
<p>Then, in BatchBook I drop that down to 95% right off the bat to shrink it ever so slightly.</p>
<p><code>div#content { font-size: 95%; }</code></p>
<p>I actually leave this step out on BatchBlue.com. I guess that&#8217;s because when you&#8217;re actually inside the app, every pixel is roughly 5% more valuable. <img src='http://www.darowski.com/tracesofinspiration/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This becomes the default font size. I then use percentages to scale headings up and supplemental text down. So, for example, if I&#8217;m adding a little note to a section that I want to appear a bit smaller, I&#8217;d mark it up as:</p>
<p><code>p.note { font-size: 90%; }</code></p>
<p>Then, to style my headings I scale it up:</p>
<p><code>h1 { font-size: 180%; }<br />
h2 { font-size: 140%; }<br />
h3  {font-size: 110%; }</code></p>
<p>With the increase in prominence of full-page zoom, I&#8217;ve considered going back to pixels. I still wouldn&#8217;t do a completely em-based design, though. I just don&#8217;t have the urge to show off my math skills that much.</p>
<h2>Override iPhone text adjustment</h2>
<p>I&#8217;ll finish with a very simple one. I like to make sure things look good on my iPhone, so I was delighted to find this on the Apple site:</p>
<blockquote cite="http://developer.apple.com/webapps/designingcontent.php">
<p>Safari on iPhone adjusts the text size so it&#8217;s more readable after the user double taps. After a double-tap, Safari on iPhone gets the width of the block of text and determines the width after a double-tap. Safari on iPhone then determines an appropriate multiplier that is applied to the layout.</p>
<p>Sometimes you might find that automatic text size adjustment doesn&#8217;t produce ideal results. For example, text in absolute-positioned elements might overflow the viewport after adjustment. Other pages might need a few minor adjustments to make them look their best. In these cases, you can override the text size adjustment.</p>
<p>Use the -webkit-text-size-adjust CSS property to override Safari&#8217;s default text size adjustment. The values for -webkit-text-size-adjust are:</p>
<ul>
<li>none: &lt;body style=&#8221;-webkit-text-size-adjust:none&#8221;&gt;</li>
<li>auto: &lt;table style=&#8221;-webkit-text-size-adjust:auto&#8221;&gt;</li>
<li>multiplier percentages: &lt;div style=&#8221;-webkit-text-size-adjust:200%&#8221;&gt;</li>
</ul>
</blockquote>
<p>Only thing is&#8230; I find the results from -webkit-text-size-adjust can make things look weird. You just never know. Sometimes a paragraph will appear half the size of an unordered list for no apparent reason. So, on BatchBlue.com and BatchBook, I&#8217;ve added this:</p>
<p><code>html {-webkit-text-size-adjust: none}</code></p>
<p>And we&#8217;re in business! Everything looks like it does on regular ol&#8217; Safari.</p>
<h2>Dassit!</h2>
<p>So, there you have it. That&#8217;s certainly not everything I use. And I&#8217;ve certainly used more complex solutions than those. But, the more complex something is, the less likely I am to use it again.</p>
<p><em>So, tell me dear reader, what are your favorite CSS techniques?</p>
<p>Or, what are you having a hard time wrapping your brain around (in regards to CSS)?</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2008/11/14/my-favorite-css-techniques/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Two Weeks: Two Redesigns (BatchBook &amp; BatchBlue.com)</title>
		<link>http://www.darowski.com/tracesofinspiration/2008/10/13/two-weeks-two-redesigns-batchbook-batchbluecom/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2008/10/13/two-weeks-two-redesigns-batchbook-batchbluecom/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 04:25:21 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[BatchBlue]]></category>
		<category><![CDATA[BatchBook]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=262</guid>
		<description><![CDATA[As a designer, I probably should be writing more here about the design I&#8217;ve been doing. Well, it&#8217;s time to give you an update.
BatchBook Redesign
A week and a half ago, I announced over at the BatchBlue Blog that we finished a redesign of BatchBook, our small business CRM.
Here&#8217;s how it looks:

In the blog post, I [...]]]></description>
			<content:encoded><![CDATA[<p>As a designer, I probably should be writing more here about the design I&#8217;ve been doing. Well, it&#8217;s time to give you an update.</p>
<h2>BatchBook Redesign</h2>
<p>A week and a half ago, <a href="http://blog.batchblue.com/product-update-batchbook-gets-a-facelift/">I announced over at the BatchBlue Blog</a> that we finished a redesign of BatchBook, our <a href="http://batchblue.com">small business CRM</a>.</p>
<p>Here&#8217;s how it looks:</p>
<p><a href="http://www.flickr.com/photos/14030843@N08/2906686850/" title="BatchBook: Contact Detail by batchbluesoftware, on Flickr"><img class="framed" src="http://farm4.static.flickr.com/3217/2906686850_8be05a4400.jpg" width="481" height="500" alt="BatchBook: Contact Detail" /></a></p>
<p>In the blog post, I talked about the main goals of the redesign, such as a better use of space, lightening up the design, making the app faster, and setting up for some more future improvements.</p>
<p>The redesign was an incredibly fun process, with the majority of the redesign happening over five days. The rest was just tweaks, special cases, and browser compatibility stuff. The first step when I started redesigning was to DELETE. I deleted a LOT of code. </p>
<p>I love CSS, but I&#8217;ve always tended to be a play-it-safe kind of guy. I use simple styles that won&#8217;t run into cross-browser issues and tend to stick with what works. Well, this was an opportunity to try some new things. First came the buttons.</p>
<p>The buttons use <a href="http://www.alistapart.com/articles/sprites/">CSS sprites</a>. So, I have one file called buttons.png (a nice 32-bit transparent png) that contains every button in the app. All buttons in the application call that same file (but since it&#8217;s already cached, it&#8217;s much faster!) and then only show a part of the image (as defined with background-position).</p>
<p>I ran into some issues and learned a decent amount while playing with the buttons. Here are some takeaways:</p>
<ul>
<li>A <code>&lt;button&gt;</code> will inherit styles differently than an <code>&lt;a&gt;</code> link. The <code>&lt;a&gt;</code> will inherit <code>font-family</code>, <code>font-size</code> and others from styles applied to the <code>&lt;body&gt;</code> tag. The <code>&lt;button&gt;</code> tag, however, needs those properties defined specifically using <code>button</code> in the selector.</li>
<li><code>border-radius</code> works like a dream in FireFox 3. It doesn&#8217;t work at all in Internet Explorer (of course). In Firefox 2, it works, but looks like poo. And Safari&#8230; it looks awesome, except that strangely it won&#8217;t apply to a <code>&lt;button&gt;</code> (I found that odd since FF2 and FF3 will do that).</li>
<li><code>display: inline-block;</code> is a wonderful thing—and it works in Firefox 3, Safari, AND Internet Explorer 7. We don&#8217;t support IE6, so it doesn&#8217;t matter that it doesn&#8217;t work. But, go figure, the problematic browser in this case was Firefox 2. It doesn&#8217;t support <code>inline-block</code>. Very frustrating. I tried some hacks, but none worked well enough. So, I had to resort to unnecessary floating.</li>
</ul>
<p>Another favorite part of this redesign was preporation for allowing user skinning. I went through the styles and commented what colors would be user definable. I set those up in a separate override style sheet. We haven&#8217;t hooked up the feature yet, but just playing with it locally has me very excited about allowing people to conform the product to their company color scheme.</p>
<p>If you haven&#8217;t checked out the <a href="http://www.flickr.com/photos/14030843@N08/sets/72157607657016965/show/">slideshow of the redesign on Flickr</a>, please take a look. I&#8217;d love to hear what you think!</p>
<h2>BatchBlue.com Redesign</h2>
<p>Instead of taking a rest after a major redesign, I embarked on another. This one wasn&#8217;t quite as big—and it also isn&#8217;t completely done yet. But on Sunday afternoon (right after <a href="http://mashable.com/2008/10/12/batchbook-2/">we hit Mashable</a>), we launched the redesign of <a href="http://batchblue.com">BatchBlue.com</a>.</p>
<p><a href="http://www.flickr.com/photos/darowskidotcom/2939804185/" title="BatchBlue.com Homepage Redesign by darowskidotcom, on Flickr"><img class="framed" src="http://farm4.static.flickr.com/3002/2939804185_04bbe669c9.jpg" width="382" height="500" alt="BatchBlue.com Homepage Redesign" /></a></p>
<p>We ran the old design through some user testing—both <a href="http://blog.batchblue.com/our-first-batchbook-batchbook-usability-test-via-twitter/">via Twitter</a> and <a href="http://blog.batchblue.com/batchblue-means-ri-business/">in person</a>. We noticed some trends emerge and worked quickly to fix them. A lot changed, but here are the highlights:</p>
<ul>
<li>It&#8217;s wider! I now have 200 extra pixels to work with. This makes me very happy.</li>
<li>The rounded corners in the header and footer (and some within the page) are long gone.</li>
<li>We&#8217;ve got a new header that more clearly talks about key benefits of the application.</li>
<li>The bulleted lists (which were far more popular than I would have guessed according to our tests) have shifted from the five <strong>tabs</strong> of BatchBook to the three main <strong>tasks</strong> you accomplish with BatchBook</li>
<li>We added personas, so you can get an idea of who BatchBook is for and what they&#8217;d use it for. But not too much info to digest.</li>
<li>We&#8217;ve written some fantastic and comprehensive Blue Papers (like a white paper, but blue!). it was time to bubble these free resources to the home page. (I worked on the <a href="http://www.batchblue.com/bluepaper-socialmedia.html">Social Media for Small Business</a> one.)</li>
</ul>
<p>A lot of other things changed inside the app, but all the really cool stuff is on the home page. We, of course, have more updates coming up that I can&#8217;t wait to talk about.</p>
<p>So, that&#8217;s it! That&#8217;s what I&#8217;ve been up to! I&#8217;d love to hear your feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2008/10/13/two-weeks-two-redesigns-batchbook-batchbluecom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Importance of Headings in HTML</title>
		<link>http://www.darowski.com/tracesofinspiration/2008/08/29/the-importance-of-headings-in-html/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2008/08/29/the-importance-of-headings-in-html/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 15:12:17 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/?p=260</guid>
		<description><![CDATA[For a couple of years now, I&#8217;ve had this great idea for a SXSW panel. I know I&#8217;m never going to pull it off, so I&#8217;d rather reveal it so that SOMEBODY could do it (because I want to see it).
Basically, I want to see all sorts of assistive technologies in action. I want to [...]]]></description>
			<content:encoded><![CDATA[<p>For a couple of years now, I&#8217;ve had this great idea for a SXSW panel. I know I&#8217;m never going to pull it off, so I&#8217;d rather reveal it so that SOMEBODY could do it (because I want to see it).</p>
<p>Basically, I want to see all sorts of assistive technologies in action. I want to see someone from the crowd offer up their URL and then &#8220;see&#8221; it fed through a screen reader. I want to see an entire room of developers realized that NO, it&#8217;s not okay to just throw a class of &#8220;bold&#8221; on a paragraph. I want to see what an eye-tracker really does. How about braille displays?</p>
<p>I was thrilled to see <a href="http://twitter.com/kemie/statuses/902740195">my friend Kemie tweet a link</a> to the video below. </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/AmUPhEVWu_E&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/AmUPhEVWu_E&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>The video is a screencast by accessibility consultant Aaron Kennon (a guess from listening to the audio) that shows how pages are rendered by a screen reader when there are HTML headers on the page and when there aren&#8217;t.</p>
<p>Please think twice before relying on CSS to convey the structure of your page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2008/08/29/the-importance-of-headings-in-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Isn&#8217;t There a lh in (X)HTML?</title>
		<link>http://www.darowski.com/tracesofinspiration/2008/05/01/why-isnt-there-a-lh-in-xhtml/</link>
		<comments>http://www.darowski.com/tracesofinspiration/2008/05/01/why-isnt-there-a-lh-in-xhtml/#comments</comments>
		<pubDate>Thu, 01 May 2008 18:13:19 +0000</pubDate>
		<dc:creator>Adam Darowski</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Last.fm]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.darowski.com/tracesofinspiration/2008/05/01/why-isnt-there-a-lh-in-xhtml/</guid>
		<description><![CDATA[Something bugs me just about every time I mark up a list in (X)HTML.
There&#8217;s no list-head (&#60;lh&#62;) element.
Let&#8217;s say I&#8217;m marking up a list of my top three Last.fm artists. It would look something like:
&#60;ol&#62;
&#160;&#160;&#60;li>Teenage Fanclub&#60;/li&#62;
&#160;&#160;&#60;li>Mogwai&#60;/li&#62;
&#160;&#160;&#60;li>Yo La Tengo&#60;/li&#62;
&#60;/ol&#62;
Which, of course, would then render like:

Teenage Fanclub
Mogwai
Yo La Tengo

But what if I wanted to label that list [...]]]></description>
			<content:encoded><![CDATA[<p>Something bugs me just about every time I mark up a list in (X)HTML.</p>
<p>There&#8217;s no list-head (<code>&lt;lh&gt;</code>) element.</p>
<p>Let&#8217;s say I&#8217;m marking up a list of my top three Last.fm artists. It would look something like:</p>
<p><code class="block">&lt;ol&gt;<br />
&nbsp;&nbsp;&lt;li>Teenage Fanclub&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li>Mogwai&lt;/li&gt;<br />
&nbsp;&nbsp;&lt;li>Yo La Tengo&lt;/li&gt;<br />
&lt;/ol&gt;</code></p>
<p>Which, of course, would then render like:</p>
<ol>
<li>Teenage Fanclub</li>
<li>Mogwai</li>
<li>Yo La Tengo</li>
</ol>
<p>But what if I wanted to label that list something like &#8220;My Top 3 Artists on Last.fm&#8221;. What are my options? I could throw it in a paragraph (<code>&lt;p&gt;</code>) tag. But a random paragraph doesn&#8217;t really semantically relate it to the list. I could put it in a header tag (<code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, etc.). That would at least tell me it is a header to <em>something</em> and not just an arbitrary paragraph. But still, that header isn&#8217;t associated with the list itself in any meaningful way (beyond proximity).</p>
<p>If I marked this up in a table, I have the option to add a table header (<code>&lt;th&gt;</code>). Tables are for tabular data, so for this example, I&#8217;ll show what the markup would look like if I wanted to make a table of my top three artists with the number of times I played them.</p>
<p><code class="block">&lt;table&gt;<br />
&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;My&nbsp;Top&nbsp;3&nbsp;Artists&nbsp;on&nbsp;Last.fm&lt;/th&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Play&nbsp;Count&lt;/th&gt;<br />
&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Teenage&nbsp;Fanclub&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;855&lt;/td&gt;<br />
&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Mogwai&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;755&lt;/td&gt;<br />
&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Yo&nbsp;La&nbsp;Tengo&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;705&lt;/td&gt;<br />
&nbsp;&nbsp;&lt;/tr&gt;<br />
&lt;/table&gt;</code></p>
<p>And that would render like this:</p>
<table>
<tr>
<th>My Top 3 Artists on Last.fm</th>
<th>Play Count</th>
</tr>
<tr>
<td>Teenage Fanclub</td>
<td>855</td>
</tr>
<tr>
<td>Mogwai</td>
<td>755</td>
</tr>
<tr>
<td>Yo La Tengo</td>
<td>705</td>
</tr>
</table>
<p>Like the header tags and <code>&lt;strong&gt;</code> tag, most (if not all) user agents will show the <code>&lt;th&gt;</code> in bold. Also, since the <code>&lt;th&gt;</code> is a different element than the standard <code>&lt;td&gt;</code>, it is really easy to style headers differently from other table cells.</p>
<p>Best of all, though, the <code>&lt;th&gt;</code> is nested <em>inside</em> the <code>&lt;table&gt;</code>, meaning that it is explicitly a part of that table. Simply adding a <code>&lt;p&gt;</code> or <code>&lt;h3&gt;</code> above the <code>&lt;table&gt;</code> wouldn&#8217;t have the same semantic value.</p>
<p>Really all I&#8217;m wondering is&#8230; why don&#8217;t we have a <code>&lt;lh&gt;</code> to use when marking up ordered and unordered lists?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darowski.com/tracesofinspiration/2008/05/01/why-isnt-there-a-lh-in-xhtml/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

