<?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>Thoughts From Eric</title>
	<atom:link href="http://meyerweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Thu, 25 Feb 2010 21:15:46 +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>Better PDF File Size Reduction in OS X</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/25/better-pdf-file-size-reduction-in-os-x/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/25/better-pdf-file-size-reduction-in-os-x/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 18:17:15 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1306</guid>
		<description><![CDATA[Being a brief recounting of the successful quest for reduced-size PDFs that don't look awful.]]></description>
			<content:encoded><![CDATA[<p>
One of the things you discover as a speaker and, especially, a conference organizer is this:  <em><a href="http://www.apple.com/iwork/keynote/">Keynote</a> generates really frickin&#8217; enormous PDFs.</em>  Seriously.  Much like Miles O&#8217;Keefe, they&#8217;re <strong>huge</strong>.  We had one speaker last year whose lovingly crafted and beautifully designed 151-slide deck resulted in a 175MB PDF.
</p>
<p>
Now, hard drives and bandwidth may be cheap, but when you have four hundred plus attendees all trying to download the same 175MB PDF at the same time, the venue&#8217;s conference manager <em>will</em> drop by to find out what the bleeding eyestalks your attendees are doing and why it&#8217;s taking down the entire outbound pipe.  Not to mention the network will grind to a nearly complete halt.  Whatever you personally may think of net access at conferences, at this point, not providing net access is roughly akin to not providing functioning bathrooms.
</p>
<p>
So what&#8217;s the answer?  <a href="http://www.panic.com/blog/2010/02/shrinkit-1-0/">ShrinkIt</a> is fine if the slides use lots of vectors and you&#8217;re running Snow Leopard.  If the slides use lots of bitmapped images, or you&#8217;re not on Snow Leopard, ShrinkIt can&#8217;t help you.
</p>
<img src="http://meyerweb.com/pix/2010/quartzfilter-saveas.png" alt="" class="pic"/>
<p>
If the slides are image-heavy, then you can always load the PDF into Preview and then do a &#8220;Save As&#8230;&#8221; where you select the &#8220;Reduce File Size&#8221; Quartz filter.  That will indeed drastically shrink the file size—that 175MB PDF goes down to 13MB—but it can also make the slides look thoroughly awful.  That&#8217;s because the filter achieves its file size reduction by scaling all the images down by at least 50% <em>and</em> to no more than 512 pixels on a side, plus it uses aggressive JPEG compression.  So not only are the images infested with compression artifacts, they also tend to get that lovely up-scaling blur.  Bleah.
</p>
<p>
I Googled around a bit and found &#8220;<a href="http://www.hoboes.com/Mimsy/hacks/quality-reduced-file-size/">Quality reduced file size in Mac OS X Preview</a> from early 2006.  There I discovered that anyone can create their own Quartz filters, which was the key I needed.  Thus armed with knowledge, I set about creating a filter that struck, in my estimation, a reasonable balance between image quality and file size reduction.  And I think I&#8217;ve found it.  That 175MB PDF gets taken down to 34MB with what I created.
</p>
<p>
If you&#8217;d like to experience this size reduction for yourself (and how&#8217;s <em>that</em> for an inversion of common spam tropes?) it&#8217;s pretty simple:
</p>

<ol>
<li>Download and unzip <a href="http://meyerweb.com/eric/tools/mac/quartzfilter-reduce-file-size-75.zip">Reduce File Size (75%)</a>.  Note that the &#8220;75%&#8221; relates to settings in the filter, not the amount of reduction you&#8217;ll get by using it.</li>
<li>Drop the unzipped <tt>.qfilter</tt> file into <tt>~/Library/Filters</tt>.</li>
</ol>

<p>
Done.  The next time you need to reduce the size of a PDF, load it up in Preview, choose &#8220;Save As&#8230;&#8221;, and save it using the Quartz filter you just installed.
</p>
<p>
If you&#8217;re the hands-on type who&#8217;d rather set things up yourself, or you&#8217;re a paranoid type who doesn&#8217;t trust downloading zipped files from sites you don&#8217;t control (and I actually don&#8217;t blame you if you are), then you can manually create your own filter like so:
</p>

<img src="http://meyerweb.com/pix/2010/quartzfilter-reducefilesize.png" alt="" class="pic"/>

<ol>
<li>Go to <tt>/Applications/Utilities</tt> and launch ColorSync Utility.</li>
<li>Select the &#8220;Filters&#8221; icon in the application&#8217;s toolbar.</li>
<li>Find the &#8220;Reduce File Size&#8221; filter and click on the little downward-arrow-in-gray-circle icon to the right.</li>
<li>Choose &#8220;Duplicate Filter&#8221; in the menu.</li>
<li>Use the twisty arrow to open the duplicated filter, then open each of &#8220;Image Sampling&#8221; and &#8220;Image Compression&#8221;.</li>
<li>Under &#8220;Image Sampling&#8221;, set &#8220;Scale&#8221; to <tt>75%</tt> and &#8220;Max&#8221; to <tt>1280</tt>.</li>
<li>Under &#8220;Image Compression&#8221;, move the arrow so it&#8217;s halfway between the rightmost marks.  You&#8217;ll have to eyeball it (unless you bust out <a href="http://iconfactory.com/software/xscope">xScope</a> or a similar tool) but you should be able to get it fairly close to the halfway point.</li>
<li>Rename the filter to whatever will help you remember its purpose.</li>
</ol>

<p>
As you can see from the values, the &#8220;75%&#8221; part of the filter&#8217;s name comes from the fact that two of the filter&#8217;s values are 75%.  In the original Reduce File Size filter, both are at 50%.  The maximum size of images in my version is also quite a bit bigger than the original&#8217;s—1280 versus 512—which means that the file size reductions won&#8217;t be the same as the original.
</p>
<p>
Of course, you now have the knowledge needed to fiddle with the filter to create your own optimal balance of quality and compression, whether you downloaded and installed the zip or set it up manually—either way, ColorSync Utility has what you need.  If anyone comes up with an even better combination of values, I&#8217;d love to hear about it in the comments.  In the meantime, share and enjoy!
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/25/better-pdf-file-size-reduction-in-os-x/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>MIXmasters</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/24/mixmasters/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/24/mixmasters/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:22:46 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1299</guid>
		<description><![CDATA[The winners of Microsoft's <a href="http://mix10k.visitmix.com/">MIX 10K Smart Coding Challenge</a> (for which I was happy to <a href="http://meyerweb.com/eric/thoughts/2010/01/22/mix-judging/">serve as one of the judges</a>) have been announced, and the Grand Prize has been awarded to...]]></description>
			<content:encoded><![CDATA[<p>
The winners of Microsoft&#8217;s <a href="http://mix10k.visitmix.com/">MIX 10K Smart Coding Challenge</a> (for which I was <a href="http://meyerweb.com/eric/thoughts/2010/01/22/mix-judging/">honored to serve</a> as <a href="http://live.visitmix.com/News/MIX-10K-Judge-Panel-Announced/">one of the judges</a>) have been announced, and the Grand Prize has been awarded to&#8230;
</p>
<p>
<a href="http://www.jimmyinteractive.com/">Jimmy D</a>&#8217;s <strong><a href="http://mix10k.visitmix.com/Entry/Details/169">Frog Log</a></strong>.
</p>
<p>
Which is an HTML5/CSS/JS entry.
</p>
<p>
That doesn&#8217;t run in Internet Explorer.
</p>
<p>
Yep.
</p>
<p>
Frog Log was my top pick, and obviously did very well with the other judges too, for a good reason: it&#8217;s a fun game.  It doesn&#8217;t play quite the same in Firefox previous to v3.5, as the drag-n-drop doesn&#8217;t work.  Instead, you click on a frog, then click where you want to place it.  I actually found that made the game a touch easier for me, but your interaction may vary.  In addition to working in Firefox, Safari, and Opera, it also runs on a number of mobile devices.
</p>
<p>
Here&#8217;s an excerpt from my judging remarks:
</p>

<blockquote>
<p>
Just a great little game, addictive and well thought out with some interesting gameplay.  I would LOVE to see this developed further by the author&#8230;  My only ding was that drag-n-drop failed in Firefox 3.5; clicking worked fine, though.
</p>
</blockquote>

<p>
I&#8217;m not sure why I had trouble with drag-n-drop in Firefox 3.5, since I don&#8217;t have have the same problem now.  Maybe I got confused with browser version numbers or something.  Regardless, it works fine, it&#8217;s a great game, and remember: it&#8217;s less than 10K unzipped.
</p>
<p>
I also gave high marks to the HTML5 runner-up, Chris Evans&#8217; <a href="http://mix10k.visitmix.com/Entry/Details/188">100pxls</a>, which was the source of <a href="http://twitter.com/meyerweb/status/8725985395">my Dadaist tweet</a> a couple of weeks back and lands right in my personal sweet spot for &#8220;doing odd things with popular web services&#8221;.  Here&#8217;s some of what I had to say in my remarks:
</p>

<blockquote>
<p>
&#8230;really liked the concept here, especially the nonsensical tweets that were generated by drawing your own icon.  The icons could be made easier to see in the main display, but I suppose that&#8217;s a minor quibble.
</p>
</blockquote>

<p>
I&#8217;d like to thank the MIX 10K crew for getting me involved as a contest judge; I really enjoyed seeing what people created and had a hard time narrowing down my votes to just a handful of winners.  More importantly, though, I offer my heartiest congratulations to all the winners, and most especially to Jimmy and Chris for doing such fun, interesting, and downright cool stuff with 10K of web standards goodness!
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/24/mixmasters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inspector Scrutiny</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/15/inspector-scrutiny/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/15/inspector-scrutiny/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 14:54:23 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1283</guid>
		<description><![CDATA[It's been said that web inspectors—Firebug, Dragonfly, and so forth—are not always entirely accurate.  The real truth is that web inspectors repeat to us the lies they are told, which are the same lies we can be told to our faces.]]></description>
			<content:encoded><![CDATA[<p>
It&#8217;s been <a href="http://meyerweb.com/eric/thoughts/2009/11/03/pseudo-phantoms/">said before</a> that web inspectors—Firebug, Dragonfly, the inspectors in Safari and Chrome, and so forth—are not always entirely accurate.  A less charitable characterization is that they lie to us, but that&#8217;s not exactly right.  The real truth is that web inspectors repeat to us the lies they are told, which are the same lies we can be told to our faces if we ask directly.
</p>
<p>
Here&#8217;s how I know this to be so:
</p>
<pre>
body {font-size: medium;}
</pre>
<p>
Just that.  Apply it to a <a href="http://meyerweb.com/eric/css/tests/medium-font.html">test page</a>.  Inspect the <code>body</code> element in any web inspector you care to fire up.  Have it tell you the computed styles for the <code>body</code> element.  Assuming you haven&#8217;t changed your browser&#8217;s font sizing preferences, the reported value will be <code>16px</code>.
</p>
<p>
You might say that that makes sense, since an unaltered browser equates <code>medium</code> with &#8220;16&#8243;.  But as we saw in &#8220;<a href="http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/">Fixed Monospace Sizing</a>&#8220;, the <code>16px</code> value is <em>not</em> what is inherited by child elements.  What is inherited is <code>medium</code>, but web inspectors <em>will never show you that</em> as a computed style.  You can see it in the list of declared styles, which so far as I can tell lists &#8220;specific values&#8221; (as per <a href="http://www.w3.org/TR/CSS2/cascade.html#value-stages">section 6.1 of CSS2.1</a>).  When you look to see what&#8217;s actually applied to the element in the &#8220;Computed Styles&#8221; view, you are being misled.
</p>
<p>
We can&#8217;t totally blame the inspectors, because what they list as computed styles is what they are given by the browser.  The inspectors take what the browser returns and prettify it for us, and give us ways to easily alter those values on the fly, but in the end they&#8217;re just DOM inspectors.  They don&#8217;t have a special line into the browser&#8217;s internal data.  Everything they report comes straight from the same DOM that any of us can query.  If you invoke:
</p>
<pre><code>var obj = document.getElementsByTagName('body')[0];
alert(getComputedStyle(obj,null).getPropertyValue('font-size'));</code>
</pre>
<p>
&#8230;on <a href="http://meyerweb.com/eric/css/tests/medium-font.html">a document being given the rule I mentioned above</a>, you will get back <code>16px</code>, not <code>medium</code>.
</p>
<p>
This fact of inspector life was also demonstrated in &#8220;<a href="http://meyerweb.com/eric/thoughts/2010/02/10/rounding-off/">Rounding Off</a>&#8220;.  As we saw there, browsers whose inspectors report integer pixel values also return them when queried directly from the DOM.  This despite the fact that <a href="http://meyerweb.com/eric/css/tests/font-size-rounding.html">it can be conclusively shown</a> that those same browsers are internally storing non-integer values.
</p>
<p>
Yes, it might be possible for an inspector to do its own analysis of properties like <code>font-size</code> by checking the element&#8217;s specified values (which it knows) and then crawling up the document tree to do the same to all of the element&#8217;s ancestors to try to figure out a more accurate computed style.  But what bothers me is that the browser reported computed values that simply aren&#8217;t accurate in the first place.  it seems to me that they&#8217;re really &#8220;actual values&#8221;, not &#8220;computed values&#8221;, again in the sense of <a href="http://www.w3.org/TR/CSS2/cascade.html#value-stages">CSS2.1:6.1</a>.  This makes <code>getComputedStyle()</code> fairly misleading as a method name; it should really be <code>getActualStyle()</code>.
</p>
<p>
No, I don&#8217;t expect the DOM or browsers to change this, which is why it&#8217;s all the more important for us to keep these facts in mind.  Web inspectors are very powerful, useful, and convenient DOM viewers and editors, essentially souped-up interfaces to what we could collect ourselves with JavaScript.  They are thus limited by what they can get the browser to report to them.  There are steps they might take to compensate for known limitations, but that requires them to second-guess both what the browser does now and what it might do in the future.
</p>
<p>
The point, if I may be so bold, is this:  never place all your trust in what a web inspector tells you.  There may be things it cannot tell you because it does not know them, and thus what it does tell you may on occasion mislead or confuse you.  Be wary of what you are told—because even though all of it is correct, not quite all of it is true, and those are always the lies that are easiest to believe.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/15/inspector-scrutiny/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Fixed Monospace Sizing</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 13:52:36 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1265</guid>
		<description><![CDATA[Monospace text sizing is, from time to time, completely unintuitive and can be quite maddening if you don't look at it in exactly the right way.  Fortunately, there is a pretty simple workaround, and it's one you might want to consider using even if you weren't aware that a problem existed.]]></description>
			<content:encoded><![CDATA[<p>
Monospace text sizing is, from time to time, completely unintuitive and can be quite maddening if you don&#8217;t look at it in exactly the right way.  Fortunately, there is a pretty simple workaround, and it&#8217;s one you might want to consider using even if you weren&#8217;t aware that a problem existed.
</p>
<p>
But first, allow me to lay some foundations.  Assuming no other author styles beyond the ones shown, consider the following:
</p>
<pre>
span {font-family: monospace;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>

All right, what should be the computed <code>font-size</code> of the <code>span</code> element?  Remember, there are no other author styles being applied.

<p>
The savvier among you will have said: &#8220;It depends, but most likely <code>13px</code>.&#8221;  That&#8217;s because here, the size of the monospace text is controlled by the browser&#8217;s preferences.  The vast majority of users, of course, have never touched their default settings of &#8220;16&#8243; for proportional fonts and &#8220;13&#8243; for monospace/fixed fonts.  For them, then, the answer is <code>13px</code>.  Similarly, if I&#8217;d asked about the <code>p</code> element&#8217;s computed <code>font-size</code>, the answer would be: &#8220;It depends, but most likely <code>16px</code>.&#8221;
</p>
<p>
So let&#8217;s add a bit more and see where we land.
</p>
<pre>
span {font-family: monospace; font-size: 1em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
As before: bearing in mind that there are no other author styles, what should be the computed <code>font-size</code> of the <code>span</code> element?
</p>
<p>
In this case, building on the previous question and answer, you might say, &#8220;It depends, but most likely <code>16px</code>.&#8221;  The reasoning here is pretty straightforward:  since the computed <code>font-size</code> of the <code>p</code> element is <code>16px</code>, the <code>font-size: 1em;</code> assigned to the <code>span</code> will result in it having the same size.
</p>
<p>
And that&#8217;s true&#8230; in two of five browsers I <a href="http://meyerweb.com/eric/css/tests/monospaced3.html">tested</a>: Opera 10 and Internet Explorer 8.  In the other three I tested&mdash;Firefox 3.6, Safari 4, and Chrome 4&mdash;the computed (and rendered) <code>font-size</code> of the <code>span</code> is <code>13px</code>, the same as in our first example.  This result holds true if the rule is changed to use <code>font: 1em monospace;</code> instead of the two separate properties.  The behavior continues to persist even when adding specific font families, like Courier New, Courier, Andale Mono, and so on to the rule.  It also persists if <code>1em</code> is converted to <code>100%</code>.
</p>
<p>
So in other words, even though I have written CSS that explicitly says &#8220;Make the <code>font-size</code> of this element the same as its parent&#8221;, three of five browsers apparently ignore me.
</p>
<p>
I say &#8220;apparently&#8221; because what&#8217;s happening is that those browsers are allowing the <code>span</code> to inherit the default <code>font-size</code> from its parent (and thus, indirectly, all its ancestors), but the default <code>font-size</code> is <code>medium</code>.  If you go <a href="http://www.w3.org/TR/CSS2/fonts.html#font-size-props">look up <code>medium</code></a>, you find out that it doesn&#8217;t have a defined numeric size. So what those browsers do is equate <code>medium</code> with the preference settings, which means it&#8217;s different for monospace fonts than for everything else.
</p>
<p>
In other words, those three browsers are doing something like this:
</p>
<ol>
<li>This <code>span</code> needs to have the same <code>font-size</code> as its parent element.</li>
<li>The parent&#8217;s <code>font-size</code> is <code>medium</code>, even though when my web inspector (or an author&#8217;s DOM script) asks, I report the <code>16px</code> I used to output the text.  So the <code>span</code>&#8217;s <code>font-size</code> is actually <code>medium</code>.</li>
<li>This <code>medium</code>-sized <code>span</code> is using a monospace font.  The preference setting for monospace is &#8220;13&#8243;, and I equate <code>medium</code> with the preference setting, so I&#8217;ll output the <code>span</code> using 13-pixel text.</li>
</ol>
<p>
Opera 10, as I said, doesn&#8217;t do this, <em>even if your monospace font preference setting is the default value of &#8220;13&#8243;</em> or indeed different from the preference for non-monospace fonts.  And IE8 doesn&#8217;t appear to do it either, although you can&#8217;t set numeric font size preferences in IE8 so what it&#8217;s actually doing is open to interpretation.  Oh, IE8, you inscrutable little scamp, you.
</p>
<p>
All that might seem reasonable enough, but it turns out that&#8217;s not the whole story.  No, the three resizing browsers are being a good deal more &#8220;clever&#8221;, if that&#8217;s actually the word I want, than that.  In fact, what those browsers do makes it seem like they use the two preference settings to create a ratio, and that ratio is used to scale monospace text.  That&#8217;s not actually what&#8217;s happening, but it looks that way at first.  To see what I mean, let&#8217;s consider:
</p>
<pre>
span {font-family: monospace; font-size: 2em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
Again: in the absence of other author styles, what should be the computed <code>font-size</code> of the <code>span</code> element?
</p>
<p>
The answer: &#8220;It depends, but most likely <code>26px</code> as long as we aren&#8217;t talking about Opera 10 or IE8.  If it is one of those two, then most likely <code>32px</code>.&#8221;  Why?  Because the resizing browsers see the <code>font-size: 2em;</code> declaration as &#8220;twice <code>medium</code>&#8221; and twice 13 is 26.  Opera 10 and IE8, as previously established, don&#8217;t do the resizing.  Or else they simply interpret <code>medium</code> as being equal to the proportional font size preference setting.  Whatever.
</p>
<p>
Okay.  So what all this means is that in many browsers, you can declare that an element&#8217;s font size should be twice the size of its parent&#8217;s and have it actually be 1.625 times the size—or, if you want to look at it another way, 0.8125 times the size you expected it to be.  The 0.8125 comes from 26/32, which of course reduces to 13/16.  If you were to adjust your browser&#8217;s preferences so the monospace setting is &#8220;15&#8243;, then monospace fonts would be 0.9375 (15/16) times the expected size.
</p>
<p>
But—and here&#8217;s where things get <em>really</em> fun—this is not always so.  See, you may not have run into this problem if you&#8217;ve been declaring specific font families with no generic fallback.  Consider this variation (note that I dropped back to <code>1em</code> for the <code>font-size</code>):
</p>
<pre>
span {font-family: "Courier New"; font-size: 1em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
This time, in every one of the five browsers I mentioned before, assuming the browser defaults, the computed (and rendered) <code>font-size</code> of the <code>span</code> will be <code>16px</code>.  Not <code>13px</code>.  And the only difference is that we switched from a generic font family to a specific one.
</p>
<p>
&#8220;Hey presto!&#8221; you shout.  &#8220;We&#8217;ll just tack the generic family on the end there and be right as rain!&#8221;  Sadly, no.  For if you do this:
</p>
<pre>
span {font-family: "Courier New", monospace; font-size: 1em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
&#8230;then the answer to the question I keep asking will be:  &#8220;It depends, but given browser defaults it will be <code>16px</code>, unless we&#8217;re talking about Safari.  In that case, it&#8217;s <code>13px</code>.&#8221;
</p>
<p>
Really.  Alone among the browsers I tested, Safari goes back to doing the resizing when you provide a generic fallback to your specific family.  Or even multiple families.  Do your best to make sure the user at least gets a fixed-width font, and you get a size smaller than you&#8217;d intended.  (You can get the back story on this in <a href="http://webkit.org/blog/67/strange-medium/">a late-2006 post on the Surfin&#8217; Safari blog</a>.)
</p>
<p>
So what do we do?  Get creative.  That&#8217;s what the <a href="http://www.w3.org/WAI/PF/aria/"><acronym title="Accessible Rich Internet Applications">ARIA</acronym></a> folks did in <a href="http://www.w3.org/WAI/PF/aria/spec.css">their specification&#8217;s style sheet</a>, where they declare two font stacks: the first with a generic fallback, and the second without it.  That works, but it&#8217;s ugly.  I didn&#8217;t like that at all.  And then, halfway through writing up this post, a fix came to me like a shot in the dark.  Check this out:
</p>
<pre>
span {font-family: "Courier New", monospace, serif; font-size: 1em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
This time around, the answer is:  &#8220;It depends, but given browser defaults, <code>16px</code>.&#8221;
</p>
<p>
Really!  Even in Safari!  And in all tested browsers, it falls back to a generic monospace font at the requested size even if the specific family (or families) we declare aren&#8217;t available!  This can be verified by altering the specific font family to something that doesn&#8217;t actually exist:
</p>
<pre>
span {font-family: "Corier Neu", monospace, serif; font-size: 1em;}

&lt;p&gt;This is a 'p' with a &lt;span&gt;'span'&lt;/span&gt; inside.&lt;/p&gt;
</pre>
<p>
Monospacey goodness at the intended, parent-matching size.  It&#8217;s enough to make a body believe in monotheism.
</p>
<p>
Since I generally assume that anything I devise was already invented by someone else, I went Googling for prior art.  And wouldn&#8217;t you know it, the Wikipedia folks <a href="http://en.wikipedia.org/wiki/User:Davidgothberg/Test59">had worked it out around the end of last year</a>.  This, of course, supports my contention that <a href="http://www.youtube.com/watch?v=4sAIZlRMeEg">Wikipedia is the new Steve Allen</a>.  I also found some claims that ending the font stack with <code>monospace, monospace</code> would have the same effect, but that wasn&#8217;t borne out in <a href="http://meyerweb.com/eric/css/tests/monospaced3.html">my testing</a>.  Perhaps it worked in older versions of browsers but no longer does.
</p>
<p>
I did leave out another way to make monospaced fonts behave as expected, which you may have already figured out from the preceding: declare the <code>font-size</code> for any parent of a monospaced element to be a length value, along the lines of <code>body {font-size: 12px;}</code>.  That will pass the length value down the document tree to the monospaced element via inheritance, which will use it without resizing it in every browser I tested.  Though you may have heard that page zooming makes pixel-sized text okay, I&#8217;m not really convinced.  Not yet.  There are too many people who don&#8217;t know how to zoom, and too many whose browsers aren&#8217;t advanced enough to zoom pages.  Even in page-zooming browsers, there are problems with pixel text.  So I&#8217;m still on the ems-and-percentages bandwagon.
</p>
<p>
In fact, there are a fair number of details and extra browser oddities that I left out of this, as it&#8217;s already way more than long enough, and besides you don&#8217;t really want to hear the gory details of manually stepping through 37 different preferences settings just to verify a theory.  Plus you already heard about <a href="http://meyerweb.com/eric/thoughts/2010/02/10/rounding-off/">the <code>font-size</code> rounding investigation</a> that spawned off of this one, about halfway through.  I think that&#8217;s more than enough for the time being.
</p>
<p>
I should also lay down a caveat: it&#8217;s possible that this behavior will be interpreted as a bug by the Safari team and &#8220;fixed&#8221;, if that&#8217;s the word I want, in a future release.  I really hope not—and if they&#8217;re looking for ways to improve how they handle monospace font sizing, I have a few suggestions—but it is possible.  Adjust your expectations accordingly.
</p>
<p>
And with that, I&#8217;m going to stop now.  I hope this will be useful to you, either now or in the future.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Rounding Off</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/10/rounding-off/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/10/rounding-off/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 18:42:44 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1253</guid>
		<description><![CDATA[In the course of digging into the guts of a much more complicated problem, I stumbled into an interesting philosophical question posed by web inspection tools.]]></description>
			<content:encoded><![CDATA[<p>
In the course of digging into the guts of a much more complicated problem, I stumbled into an interesting philosophical question posed by web inspection tools.
</p>
<p>
Consider the following CSS and HTML:
</p>
<pre>
p {font-size: 10px;}
b {font-size: 1.04em;}

&lt;p&gt;This is text &lt;b&gt;with some boldfacing&lt;/b&gt;.&lt;/p&gt;
</pre>
<p>
Simple enough.  Now, what is the computed <code>font-size</code> for the <code>b</code> element?
</p>
<p>
There are two valid answers.  Most likely one of them is intuitively obvious to you, but take a moment to contemplate the rationale for the answer you didn&#8217;t pick.
</p>
<p>
Now, consider the ramifications of both choices on a situation where there are <code>b</code> elements nested ten layers deep.
</p>
<p>
If you hold that the answer is <code>10px</code>, then the computed <code>font-size</code> of the tenth level of nesting should still be <code>10px</code>, because at every level of nesting the mathematical answer will be rounded down to 10.  That is: for every <code>b</code> element, its computed <code>font-size</code> will be <code>round(10*1.04)</code>, which will always yield 10.
</p>
<p>
If, on the other hand, you hold that the answer is <code>10.4px</code>, then the computed <code>font-size</code> of the tenth level of nesting should be <code>14.802442849px</code>.  That might get rounded to some smaller number of decimal places, but even so, the number should be pretty close to 14.8.
</p>
<p>
The simplest test, of course, is to <a href="http://meyerweb.com/eric/css/tests/font-size-rounding.html">set up a ten-level-deep nesting of <code>b</code> elements with the previously-shown CSS and find out what happens</a>.  If the whole line of text is the same size, then browsers round their computed <code>font-size</code> values before passing them on.  If the text swells in size as the nesting gets deeper, then they don&#8217;t.
</p>
<p>
As it happens, in all the browsers I&#8217;ve tested, the text swells, so browsers are passing along fractional pixel values from level to level.  That&#8217;s not the interesting philosophical question.  Instead, it is this:  <em>do web inspectors that show integer <code>font-size</code> values in their &#8216;computed style&#8217; windows lie to us?</em>
</p>
<p>
To see what I mean, load up <a href="http://meyerweb.com/eric/css/tests/font-size-rounding.html">the font size rounding test page</a> in Firefox and use Firebug to inspect the &#8220;1(&#8220;, which is the first of the <code>b</code> elements, in the first (1.04em) test case.  Make sure you&#8217;re looking at the &#8220;Computed Styles&#8221; pane in Firebug, and you&#8217;ll get a computed <code>font-size</code> of <code>10.4px</code>.  That makes sense: it&#8217;s 10 × 1.04.
</p>
<p>
Now try the inspecting that same &#8220;1(&#8221; in Safari or Opera.  Both browsers will tell you that the computed <code>font-size</code> of that <code>b</code> element is <code>10px</code>.  But we already know that it&#8217;s actually <code>10.4px</code>, because the more deeply-nested layers of <code>b</code> elements increase in size.  These inspectors are rounding off the internal number before showing it to us.  Arguably, they are lying to us.
</p>
<p>
But are they really?  The reason to doubt this conclusion is that the values shown in those inspectors accurately reflect the value being used to render the characters on-screen.  To see what I mean, look at the last example on the test page, where there&#8217;s sub-pixel size testing.  The &#8220;O&#8221; characters run from a flat 10 pixels to a flat 11 pixels in tenths (or less) of a pixel, all of their <code>font-size</code>s assigned with inline <code>style</code> elements to pin the characters down as much as possible.  In Safari, you can see the size jump up one pixel right around the text&#8217;s midpoint, where I wrote <code>font-size: 10.5px</code>.  So everything from <code>10px</code> to <code>10.49px</code> gets drawn at 10 pixels tall; everything from <code>10.5px</code> to <code>11px</code> is 11 pixels tall.  Safari&#8217;s inspector reflects this accurately.  It&#8217;s telling you the size used to draw the text.
</p>
<img src="http://meyerweb.com/pix/2010/OOOOO.png" alt="A comparative illustration of the many-O test case in three different browsers showing three different results.  The browsers used to create the illustration were Safari, Opera, and Firefox." class="pic border" />
<p>
In Opera 10.10, you get the same thing except that the jump from 10 to 11 pixels happens on the very last &#8220;O&#8221;, both visually and in the inspector (Dragonfly).  That means that when it comes to font sizes, Opera <em>always rounds down</em>.  Everything from <code>10px</code> to <code>10.9px</code>—and, presumably, <code>10.99999px</code> for as many nines as you&#8217;d care to add—will be drawn 10 pixels tall.  Brilliant.
</p>
<p>
In Firefox for OS X, there&#8217;s no size jump.  The &#8220;O&#8221; characters look like they form a smooth line of same-size text.  In fact, they&#8217;re all being drawn subtly differently, thanks to their subtly different <code>font-size</code> values.  If you use OS X&#8217;s Universal Access screen zooming to zoom way, way in, you can see the differences in pixel shading from one &#8220;O&#8221; to the next.  Even if you don&#8217;t, though, the fact that it&#8217;s hard to tell that there is an increase in size from one end of the line to the other is evidence enough.
</p>
<p>
In Firefox for XP, on the other hand, the size jump occurs just as it does in Safari, going from 10 pixels to 11 pixels of text size at the 10.5 mark.  But Firebug still reports the correct computed <code>font-size</code> values.  Thus, its reported value doesn&#8217;t match the size of the text that&#8217;s been output to the screen.  Arguably, it&#8217;s lying just as much as Safari and Opera,  in a different way.
</p>
<p>
But, again: is it really?  The computed values are being accurately reported.  That there is a small variance between that fractional number and the display of the text is arguably irrelevant, and can lead to its own confusion.  Situations will arise where apparent rounding errors have occurred—I see people complain about them from time to time—when the apparent error is really an artifact of how information is delivered.
</p>
<p>
I have my own thoughts about all this, but I&#8217;m much more interested in the thoughts of others.  <strong>What do you think?</strong>  Should web inspectors report the CSS computed values accurately, without regard to the actual rendering effects; or should the inspectors modify the reported values to more accurately reflect the visual rendering, thus obscuring the raw computed values?
</p>

<p>
<strong>Addendum 10 Feb 10:</strong> I&#8217;ve updated the test page with a JS link that will dynamically insert the results of <code>getComputedStyle(el,null).getPropertyValue("font-size")</code> into the test cases.  The results are completely consistent with what the inspectors report in each browser.  This tells us something about the inspectors that most of us probably don&#8217;t consciously realize: that what they show us rests directly on the same JS/DOM calls we could write ourselves.  In other words, inspectors are not privileged in what they can &#8220;see&#8221;; they have no special view into the browser&#8217;s guts.  Thus another way to look at this topic is that inspectors simply repeat the lies that browsers tell the world.
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/10/rounding-off/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Events and A Day, Belatedly</title>
		<link>http://meyerweb.com/eric/thoughts/2010/02/08/events-and-a-day-belatedly/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/02/08/events-and-a-day-belatedly/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:29:11 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[An Event Apart]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1247</guid>
		<description><![CDATA[In which I talk about the 2010 schedule for An Event Apart, including a very special Day Apart.]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;m a bad conference organizer.
</p>
<p>
Why?  Because we opened the <a href="http://aneventapart.com/">An Event Apart</a> 2010 schedule <a href="http://store.aneventapart.com/">for sales</a> back in, um, flippin&#8217; <em>November</em>, and I never mentioned it here.  Cripes, I never even posted when we announced the lineup of cities.  I could go through the great big long sob-story list of reasons why 2009 was really tough and blah blah blah, but when you get right down to it, I fell down on my job.
</p>
<p>
Okay.  So.  Time to correct that.
</p>
<p>
<small><i>(deep breath)</i></small>
</p>
<p>
Hey everyone, check it out: the complete tour schedule for An Event Apart 2010!  Woohoooo!
</p>

<ol>
<li><strong><a href="http://aneventapart.com/2010/seattle/">Seattle</a></strong>: April 5-7, 2010 (yes, <em>three</em> days; more on that anon)</li>
<li><strong><a href="http://aneventapart.com/2010/boston/">Boston</a></strong>: May 24-25, 2010</li>
<li><strong><a href="http://aneventapart.com/2010/minneapolis/">Minneapolis</a></strong>: July 26-27, 2010</li>
<li><strong><a href="http://aneventapart.com/2010/dc/">Washington, DC</a></strong>: September 16-17, 2010</li>
<li><strong><a href="http://aneventapart.com/2010/sandiego/">San Diego</a></strong>: November 1-2, 2010</li>
</ol>

<p>
We&#8217;ve got a pretty killer lineup, if I do say so myself.  You can get the mostly-complete list from <a href="http://aneventapart.com/news/2009/11/03/registration-is-now-open-for-2010/">our opening-of-sales announcement last November</a>.  It lists the people we had confirmed at the time; there have been a few additions since then.  Check out your city of choice to see who&#8217;s going to be there!  (But always remember that speaker lineups are subject to change: speakers are people too, and life has a way of interfering with schedules.  I myself had to withdraw from An Event Apart Boston last year due to a family emergency.)
</p>
<p>
The price to register for these two-day, one-track Events is the same as it was in 2009, and there are <a href="http://aneventapart.com/about/">educational and group discounts available</a> for those who are interested.
</p>
<p>
But wait, I just said &#8220;two-day&#8221; when the first show of the year is clearly <em>three</em> days.  What gives?
</p>
<p>
Seattle is the site of our first-ever <strong>A Day Apart</strong>, a full-day workshop that can be attended on its own or as part of a full three days of Event Apart ecstasy.  And the inaugural Day Apart will be nothing less than a detailed plunge into HTML 5 and CSS3 with Jeremy Keith and Dan Cederholm.  Jeremy handles the markup; Dan gets stylish.  It&#8217;s going to be fantastic.  I&#8217;m going to be in the back of the room for the whole day, soaking up as much as I can.
</p>
<p>
If you want to <a href="https://store.aneventapart.com/#seattle-2010">attend just the workshop</a>, it&#8217;s $399 for the whole day if you buy an early bird ticket (available through March 5th).  The price goes up $50 when early bird ends, and another $100 if you show up at the door.  But I wouldn&#8217;t recommend that last, because I don&#8217;t think there will be any tickets available at the door.  Again: if you show up unannounced on the day of the workshop and ask to buy a ticket, we will most likely have to turn you away, because I expect that there won&#8217;t be any seats available.
</p>
<p>
On the other hand, maybe you&#8217;d like to experience more than just one day of AEA goodness.  Maybe you&#8217;d like to go whole hog and <a href="https://store.aneventapart.com/#seattle-2010">attend both the two-day Event Apart and the subsequent Day Apart</a>, soaking up all the knowledge and enthusiasm and camaraderie that typifies An Event Apart.  And who could blame you?  If you do <em>that</em>, then the total early bird price for all three days is $1,190, whereas buying the event and workshop passes separately would total $1,294.  That&#8217;s right: you actually get slightly more than $100 off the cost of the workshop if you attend all three days, over and above the early bird discount.  (Or you can think of it as getting $100+ off the cost of the conference.  We&#8217;re not fussy.)
</p>
<p>
As it happens, these three-day passes have proved quite popular.  So if you want to get your hands on one of those—or on any Seattle tickets, whether one, two, or three days—I wouldn&#8217;t wait too long.  Our internal analyses suggest that there will come a time, some time before the doors open on April 5th, that the ability to buy a ticket will cease to be.  It may even pine for a fjord or two.
</p>
<p>
As for the four shows that come after Seattle, well, they&#8217;re looking pretty popular too.
</p>
<p>
I know I say this every year, but I&#8217;m really excited about what we&#8217;ve got planned for the year.  Jeffrey and I constantly and (we hope) consistently strive to create an event that we ourselves want to attend, and that&#8217;s absolutely true of the shows and workshop we have planned in 2010.  I can&#8217;t wait to hear what the speakers and attendees have to share.  Hope to see you there!
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/02/08/events-and-a-day-belatedly/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MIX Judging</title>
		<link>http://meyerweb.com/eric/thoughts/2010/01/22/mix-judging/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/01/22/mix-judging/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 20:50:25 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1242</guid>
		<description><![CDATA[MIX is having a 10K contest, HTML 5 is one of the allowed formats, and I'm a contest judge.]]></description>
			<content:encoded><![CDATA[<p>
I was recently honored to be asked to be a judge for the <a href="http://mix10k.visitmix.com/">MIX 10k Smart Coding Challenge</a>, running in conjunction with Microsoft&#8217;s <a href="http://visitmix.com/">MIX conference</a>.  The idea is to create a really great web application that totals no more than 10KB in its unzipped state.
</p>
<p>
Why did I agree to participate?  As much as I&#8217;d like to say &#8220;<a href="http://www.penny-arcade.com/comic/2000/10/23/">fat sacks of cash</a>&#8220;, that wasn&#8217;t it at all.  (Mostly due to the distinct lack of cash, sacked or otherwise.  Sad face.)  The <a href="http://mix10k.visitmix.com/Terms#4">contest&#8217;s entry requirements</a> actually say it for me.  In excerpted form:
</p>

<ul>
<li>The entry MUST use one or more of the following technologies: Silverlight, Gestalt or HTML5&#8230;</li>
<li>The entry MUST function in 3 or more of the following browsers: Internet Explorer, Firefox, Safari, Opera, or Chrome&#8230;</li>
<li>The entry MAY use any of the following additional technology components&#8230;
<ul>
<li>CSS</li>
<li>JavaScript</li>
<li>XAML/XML</li>
<li>Ruby</li>
<li>Python</li>
<li>Text, Zip and Image files (e.g. png, jpg or gif)</li>
</ul>
</li>
</ul>

<p>
Dig that:  not only is the contest open to HTML 5 submissions, but it has to be cross-browser compatible.  Okay, technically it only has to be three-out-of-five compatible, but still, that&#8217;s a great contest requirement.  Also note that while IE is one of the five, it is not a <em>required</em> one of the five.
</p>
<p>
I imagine there will be a fair number of Silverlight and Gestalt entries, and I might look at them, but I&#8217;m really there—was really asked—because of the HTML 5 entries.  By which I mean the open web entries, since any HTML 5 entry is also going to use CSS, JavaScript, and so on.
</p>
<p>
The downside here is that the contest ends in just one week, at 3pm U.S. Pacific time on 29 January.  I know that time is tight, but if you&#8217;ve got a cool HTML 5-based application running around in your head, this just might be the time to let it out.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/01/22/mix-judging/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Into the Fray</title>
		<link>http://meyerweb.com/eric/thoughts/2009/11/27/into-the-fray/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/11/27/into-the-fray/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:40:31 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1233</guid>
		<description><![CDATA[I am now a Fray Contributor.  Official, for real, badge and everything.  This is a huge deal for me.  I still have a little trouble believing it.]]></description>
			<content:encoded><![CDATA[<p>
I am now a <a href="http://fray.com/">Fray</a> Contributor.  Official, for real, badge and everything&#8212;check the sidebar on the home page.  My completely and in many ways unbelievably true story of beginnings around an ending, &#8220;A Death of Coincidence&#8221;, appears in <a href="http://fray.com/issue3/">Issue 3: <cite>Sex &amp; Death</cite></a>.
</p>
<p>
This is a huge deal for me.  I still have a little trouble believing it.
</p>
<p>
For a long time&#8212;as in, for more than a decade&#8212;I&#8217;ve had &#8220;participate in Fray&#8221; as one of those little deferred dreams we all carry around in the background.  I certainly could&#8217;ve submitted pieces all along, either for the original site or one of the live events, and might even have been accepted.  The thing is, I wasn&#8217;t dreaming of simply getting a piece accepted and checking an internal to-do box.  I wanted to participate the <em>right</em> way, by my own internal reckoning.  That meant not only vying for inclusion, but doing so with a worthy story, one that felt right.
</p>
<p>
When Fray relaunched as a themed quarterly, I took notice.  I often work better when I have something to work against; constraints energize me more than they chafe.  The <a href="http://fray.com/issue1/">first issue</a>&#8217;s theme, &#8220;Busted!&#8221;, called to mind a few childhood incidents, but nothing really coalesced.  There was nothing that said, &#8220;I&#8217;m a Fray piece; write me.&#8221;  The <a href="http://fray.com/issue2/">second issue</a>&#8217;s theme, &#8220;Geek&#8221;, left me with far too many options.  I couldn&#8217;t hook onto anything with the right vibe.
</p>
<p>
Then <a href="http://fray.com/issue3/">issue 3</a>&#8217;s theme was announced, and I knew exactly what I was going to submit.  No rumination of possible narratives, no idle exploring my past for ideas, no doubt at all.  I knew, and it was <em>right</em>.
</p>
<p>
In fact, it was <a href="http://meyerweb.com/other/mom/coincidences.html">a piece I&#8217;d already written</a>, except for the ending.  The ending I had used was certainly good enough, and was certainly the right ending for the time and place I wrote and performed it.  But there had always been a different, nearly unbelievable ending to that story and I&#8217;d always held it back, kept close to myself, never quite sure why.  Now I know why.  It was the piece that made that story a Fray story.
</p>
<p>
If you want to read it, you&#8217;ll need to <a href="http://fray.com/store/">pick up Issue 3 of Fray</a>, which you can of course do very easily.  You can pick up issues 1 and 3 together for a great price, or become a subscriber and get issue 3 as your first.  Any of those would be awesome.  Or, I suppose, you can wait until the piece is published for free on the Fray site, though I should tell you that it could be a long while until that happens.
</p>
<p>
I can&#8217;t thank Frayer-in-Chief <a href="http://powazek.com/">Derek Powazek</a> enough for including me in Fray.  I am quite literally as proud as I was when <a href="http://meyerweb.com/eric/books/css-tdg/">my first book</a> was published.  I&#8217;ve passed a personal and professional milestone, and far from just ticking off a checkbox on some internal to-do list, I&#8217;m basking in the glow of a dream fully and properly fulfilled.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/11/27/into-the-fray/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Correcting Corrupted Characters</title>
		<link>http://meyerweb.com/eric/thoughts/2009/11/19/correcting-corrupted-characters/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/11/19/correcting-corrupted-characters/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 14:12:10 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1214</guid>
		<description><![CDATA[At some point, for some reason, all my UTF-8 characters in WordPress got mangled into ISO-8859-1 equivalents.  I need help figuring out a way to change them all back.]]></description>
			<content:encoded><![CDATA[<p>
At some point, for some reason I cannot quite fathom, a WordPress or PHP or mySQL or some other upgrade took all of my WordPress database&#8217;s UTF-8 and translated it to (I believe) ISO-8859-1 and then dumped the result back right back into the database.  So <a href="http://meyerweb.com/eric/thoughts/2009/01/22/using-http-headers-to-serve-styles/#comment-438043">&#8220;Emil Björklund&#8221; became &#8220;Emil Bj&Atilde;&para;rklund&#8221;</a>.  <del datetime="2009-11-19T22:00:09+00:00">(If those looked the same to you, then I see &#8220;B&Atilde;&para;rklund&#8221; for the second one, and you should tell me which browser and OS you&#8217;re using in the comments</del>.)  This happened all throughout the WordPress database, including to commonly-used characters like &#8217;smart&#8217; quotes, both single and double; em and en dashes; ellipses; and so on.  It also apparently happened in all the DB fields, so not only were posts and comments affected, but commenters&#8217; names as well (for example).
</p>
<p>
And I&#8217;m pretty sure this isn&#8217;t just a case of the correct characters lurking in the DB and being downsampled on their way to me, as I have WordPress configured to use UTF-8, the site&#8217;s <code>head</code> contains a <code>meta</code> that declares UTF-8, and a peek at the HTTP response headers shows that I&#8217;m serving UTF-8.  Of course, I&#8217;m not really expert at this, so it&#8217;s possible that I&#8217;ve misunderstood or misinterpreted, well, just about anything.  To be honest, I find it deeply objectionable that this kind of stuff is still a problem here on the eve of 2010, and in general, enduring the effluvia of erroneous encoding makes my temples throb in a distinctly unhealthy fashion.
</p>
<p>
Anyway.  Moving on.
</p>
<p>
I found <a href="http://wordpress.org/extend/plugins/search-and-replace/">a search-and-replace plugin</a>&#8212;ironically enough, one written by a person whose name contains a character that would currently be corrupted in my database&#8212;that lets me fix the errors I know about, one at a time.  But it&#8217;s a sure bet there are going to be tons of these things littered all over the place and I&#8217;m not likely to find them all, let alone be able to fix them all by hand, one find-and-replace at a time.
</p>
<p>
What I need is a WordPress plugin or something that will find the erroneous character strings in various fields and turn them back into good old UTF-8.  Failing that, I need a good table that shows the ISO-8859-1 equivalents of as many UTF-8 characters as possible, or else a way to generate that table for myself.  With that table in hand, I at least have a chance of writing a plugin to go through and undo the mess.  I might even have it monitor the DB to see if it happens again, and give me a big &#8220;Clean up!&#8221; button if it does.
</p>
<p>
So: anyone got some pointers they could share, information that might help, even code that might make the whole thing go away?
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/11/19/correcting-corrupted-characters/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>To All Who Seek It</title>
		<link>http://meyerweb.com/eric/thoughts/2009/11/12/to-all-who-seek-it/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/11/12/to-all-who-seek-it/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 21:33:07 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1192</guid>
		<description><![CDATA[How many times had I heard this before?  Did it matter?]]></description>
			<content:encoded><![CDATA[<p>
It wasn&#8217;t what I would call unseasonably cold, but then the season was mid-autumn and the afternoon wind along the river did cut the skin a bit.  I kept my leather jacket zipped up all the way as I made my way back to the hotel with shopping bag in hand.  Brisk, I might have said back home, or even chilly.  Not winter yet, but you could feel it coming in the snap and shift of the air.
</p>
<p>
I crossed the last street before the hotel, keeping an eye on both the short-cycle light and the short-tempered traffic.  Not that there was any particular reason for them to be short-tempered&#8212;it was a Sunday afternoon and there were hardly any cars on the bridges and roads that grid the downtown area&#8212;but I knew from experience that pedestrian intimidation was something of a sport for the locals, and I really didn&#8217;t feel like tempting fate, or at least somebody&#8217;s ideas about what constituted a bit of fun.
</p>
<p>
Having threaded through the small bunch of oncoming pedestrians and reached the relative safety of the sidewalk, I came upon a large man with two children in tow, all bundled against the cold in parkas and scarves and hats.  He asked if I had a minute, and I immediately knew what was coming.  Sure enough, it came out: the request for a dollar, some change, anything I could spare.  I glanced at him, at the children, back at him.  Something for bus fare, he said.  They&#8217;d missed dinner at the Mission the night before, he said.  Just a little help, anything I could do, he said.
</p>
<p>
How many times had I heard this before?  I gave the usual excuses about not having any cash, I only travel with credit cards, so sorry, had to go.
</p>
<p>
And went, the wind biting into my cheeks as I strode to the hotel&#8217;s front door, the overhead heater blowing a curtain of warmth across the entryway.  Into the lobby.  Into the elevator.  Thirty floors into the air.  And in my sight, still, the children looking at me.  The boy of maybe eight, looking up at me curiously.  The girl of six, peeping at me warily from behind the man&#8217;s bulk.  Props?  Accomplices?
</p>
<p>
Did it matter?
</p>
<p>
I stood at the counter of the lobby gift shop, stacks of nutrition bars in my hands.  A bottle of water in the side pocket of the jacket I had yet to shed.  An apple in the other.  My credit card between two fingers, ready for the attendant to take.
</p>
<p>
Through the doors, into the cold wind under the canopy, the plastic shopping bag weighing down my hand.  I reached the sidewalk and there they were on the same corner, looking like they were getting ready to cross the street.  I caught the man&#8217;s eye, signaled him to wait.  As I approached his face shifted, softened, something like relief warring with shame melding into a curiously childlike expression.
</p>
<p>
&#8220;God bless you,&#8221; he said to me, and I chose to believe that he meant it.  The little boy smiled up at me, a tiny edge embedded in the corners of his mouth.  The girl still peeped warily, maybe even more so now.  The man and I were shaking hands, looking squarely at each other for a moment.  I told him to make sure to get the kids to that Mission dinner.  I could think of nothing else to say, because it was the only thing I was thinking.  Get the kids fed, keep them as healthy as possible, no matter what else.
</p>
<p>
As I turned into the recessed, canopied area that sheltered the hotel&#8217;s front door, I glanced back at the street corner.  The three of them were waiting to cross toward the small park to the north, the gift shop&#8217;s white bag ludicrously small in the big man&#8217;s hands, and then they were occluded by the building&#8217;s corner.  I walked back through the wall of warm air, into the dim lobby and out of the bright outdoors, thinking that there was every chance I&#8217;d been suckered, and knowing that it didn&#8217;t matter.
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/11/12/to-all-who-seek-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pseudo-Phantoms</title>
		<link>http://meyerweb.com/eric/thoughts/2009/11/03/pseudo-phantoms/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/11/03/pseudo-phantoms/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:41:10 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1180</guid>
		<description><![CDATA[
In the course of a recent debugging session, I discovered a limitation of web inspectors (Firebug, Dragonfly, Safari&#8217;s Web Inspector, et al.) that I hadn&#8217;t quite grasped before: they don&#8217;t show pseudo-elements and they&#8217;re not so great with pseudo-classes.  There&#8217;s one semi-exception to this rule, which is Internet Explorer 8&#8217;s built-in Developer Tool.  [...]]]></description>
			<content:encoded><![CDATA[<p>
In the course of a recent debugging session, I discovered a limitation of web inspectors (Firebug, Dragonfly, Safari&#8217;s Web Inspector, et al.) that I hadn&#8217;t quite grasped before: they don&#8217;t show pseudo-elements and they&#8217;re not so great with pseudo-classes.  There&#8217;s one semi-exception to this rule, which is Internet Explorer 8&#8217;s built-in Developer Tool.  It shows pseudo-elements just fine.
</p>
<p>
Here&#8217;s an example of what I&#8217;m talking about:
</p>

<pre><code>p::after {content: " -\2761-"; font-size: smaller;}
</code></pre>

<p>
Drop that style into any document that has paragraphs.  Load it up in your favorite development browser.  Now inspect a paragraph.  You will not see the generated content in the DOM view, and you won&#8217;t see the pseudo-element rule in the Styles tab (except in IE, where you get the latter, though not the former).
</p>

<a href="http://www.flickr.com/photos/meyerweb/4071955467/"><img src="http://meyerweb.com/pix/2009/firebug-crop.png" class="pic border" alt="" /></a>

<p>
The problem isn&#8217;t that I used an escaped Unicode reference; take that out and you&#8217;ll still see the same results, as on <a href="http://meyerweb.com/eric/css/tests/pseudos-inspector-test.html">the test page I threw together</a>.  It isn&#8217;t the double-colon syntax, either, which all modern browsers handle just fine; and anyway, I can take it back to a single colon and still see the same results.  <code>::first-letter</code>, <code>::first-line</code>, <code>::before</code>, and <code>::after</code> are all basically invisible in most inspectors.
</p>
<p>
This can be a problem when developing, especially in cases such as having a forgotten, runaway <a href="http://www.positioniseverything.net/easyclearing.html">generated-content clearfix</a> making hash of the layout.  No matter how many times you inspect the elements that are behaving strangely, you aren&#8217;t going to see anything in the inspector that tells you why the weirdness is happening.
</p>
<p>
The same is largely true for dynamic pseudo-classes.  If you style all five link states, only two will show up in most inspectors&#8212;either <code>:link</code> or <code>:visited</code>, depending on whether you&#8217;ve visited the link&#8217;s target; and <code>:focus</code>.  (You can sometimes also get <code>:hover</code> in Dragonfly, though I&#8217;ve not been able to do so reliably.  IE8&#8217;s Developer Tool always shows <code>a:link</code> even when the link is visited, and doesn&#8217;t appear to show any other link states.  &#8230;yes, this is getting complicated.)
</p>
<p>
The more static pseudo-classes, like <code>:first-child</code>, do show up pretty well across the board (except in IE, which doesn&#8217;t support all the advanced static pseudo-classes; e.g., <code>:last-child</code>).
</p>

<a href="http://www.flickr.com/photos/meyerweb/4072718108/"><img src="http://meyerweb.com/pix/2009/iedevtool-crop.png" class="pic border" alt="" /></a>

<p>
I can appreciate that inspectors face an interesting challenge here.  Pseudo-elements are just that, and aren&#8217;t part of the actual structure.  And yet Internet Explorer&#8217;s Developer Tool manages to find those rules and display them without any fuss, even if it doesn&#8217;t show generated content in its DOM view.  Some inspectors do better than others with dynamic pseudo-classes, but the fact remains that you basically can&#8217;t see some of them even though they will potentially apply to the inspected link at some point.
</p>
<p>
I&#8217;d be very interested to know what inspector teams encountered in trying to solve this problem, or if they&#8217;ve never tried.  I&#8217;d be <em>especially</em> interested to know why IE shows pseudo-elements when the others don&#8217;t&#8212;is it made simple by their rendering engine&#8217;s internals, or did someone on the Developer Tool team go to the extra effort of special-casing those rules?
</p>
<p>
For me, however, the overriding question is this: what will it take for the various inspectors to behave more like IE&#8217;s does, and show pseudo-element and pseudo-class rules that are associated with the element currently being inspected?  And as a bonus, to get them to show in the DOM view where the pseudo-elements actually live, so to speak?
</p>
<p>
<small>(<strong>Addendum:</strong> when I talk about IE and the Developer Tool in this post, I mean the tool built into IE8.  I did not test the Developer Toolbar that was available for IE6 and IE7.  Thanks to <a href="http://www.bogglethemind.com/">Jeff L</a> for pointing out the need to be clear about that.)</small>
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/11/03/pseudo-phantoms/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>A Matter of Conscience</title>
		<link>http://meyerweb.com/eric/thoughts/2009/10/17/a-matter-of-conscience/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/10/17/a-matter-of-conscience/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 01:51:14 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Observations]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1171</guid>
		<description><![CDATA[Louisiana Justice of the Peace Keith Bardwell has gained national notoriety for personally refusing to issue a marriage license to an interracial couple.  I've found myself very interested by one of the things he said by way of explanation.]]></description>
			<content:encoded><![CDATA[<p>
So Louisiana Justice of the Peace Keith Bardwell has gained national notoriety for <a href="http://www.wwltv.com/local/stories/wwl101709mlmarriage.227fa1c6a.html">refusing to issue a marriage license to an interracial couple</a>, referring them instead to another justice to have the marriage performed.  His action has, of course, provoked a great deal of condemnation.  Pretty much every elected Louisiana official above Mr. Bardwell (and plenty of them to either side) in the administrative hierarchy has called for his removal from his position.  That goes all the way up to Republican Governor Bobby Jindal, who said:
</p>
<blockquote>
<p>
&#8220;This is a clear violation of constitutional rights and federal and state law. Mr. Bardwell&#8217;s actions should be fully reviewed by the Judiciary Commission and disciplinary action should be taken immediately &#8211; including the revoking of his license.&#8221;
</p>
</blockquote>
<p>
As for Mr. Bardwell himself,<a href="http://news.yahoo.com/s/ap/20091015/ap_on_re_us/us_interracial_rebuff"> he has claimed not to be racist, but instead concerned for the biracial children that result from mixed-race marriage</a>.  Of all that he&#8217;s said, though, I was particularly interested by the following:
</p>
<blockquote>
<p>
&#8220;I didn&#8217;t tell this couple they couldn&#8217;t get married. I just told them I wouldn&#8217;t do it.&#8221;
</p>
</blockquote>
<p>
It interested me because it&#8217;s exactly the kind of reasoning that underlies &#8220;conscience protection&#8221; laws that exempt medical professionals who wish to refuse participation in abortion, or dispensation of contraception.
</p>
<p>
So now I&#8217;m very curious to know whether what pro-life groups have to say about what this man has done and how he&#8217;s done it.  Or, for that matter, what Governor Jindal himself now thinks of <a href="http://www.nola.com/news/t-p/capital/index.ssf?/base/news-7/124703057228210.xml&amp;coll=1">the bill he recently signed into law</a>.
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/10/17/a-matter-of-conscience/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Related Idea: A New Cognition Term</title>
		<link>http://meyerweb.com/eric/thoughts/2009/10/02/related-idea-a-new-cognition-term/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/10/02/related-idea-a-new-cognition-term/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 18:39:29 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Observations]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1159</guid>
		<description><![CDATA[Because this happened to me recently and I needed a compact term to describe it.]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 1.6em;">
<strong>cornpensation</strong>, <i>noun</i>.  The act of making mental adjustment for <a href="http://www.ironicsans.com/2008/02/idea_a_new_typography_term.html">keming</a> that doesn&#8217;t actually exist.
</p>
<p>
Example: &#8220;Wait, you wanted me to buy cheerleader <i>pom poms</i>?  Oh.  I totally cornpensated that one.  &#8230;Awkward.&#8221;
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/10/02/related-idea-a-new-cognition-term/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML5 And You</title>
		<link>http://meyerweb.com/eric/thoughts/2009/09/07/html5-and-you/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/09/07/html5-and-you/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 13:42:24 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1153</guid>
		<description><![CDATA[Here's the thing about the HTML5 specification that might not be obvious right away:  it's not for you.  It's for implementors.  And that's a good thing.
]]></description>
			<content:encoded><![CDATA[<p>
I mentioned in <a href="http://meyerweb.com/eric/thoughts/2009/09/02/nine-into-five/">my previous post</a> that I &#8220;had come away with my head reeling from the massive length and depth of the often-changing specification&#8221;, which is entirely true.  Printouts of the current draft of the HTML5 spec can reach, depending on your operating system and installed fonts, somewhere north of 900 pages.  Yes: <em>nine hundred</em>.  There are unabridged Stephen King novels that run shorter.
</p>
<p>
You might well say to yourself: &#8220;Self, is it just me, or are the people doing this completely off their everlovin&#8217; rockers?  Because the specification for something as fundamentally simple as HTML should reach maybe 200 pages, max.&#8221;  You might even despair that the entire enterprise is doomed to failure precisely because nobody sane will ever sit down to read that entire doorstop.
</p>
<p>
But there&#8217;s no real reason to panic, because here&#8217;s the thing about the HTML5 specification that might not be obvious right away:  <a href="http://www.penny-arcade.com/comic/2004/3/24/">it&#8217;s not <em>for</em> you</a>.  It&#8217;s for implementors.  And that&#8217;s a good thing.
</p>
<p>
If you do start reading the HTML5 draft, you&#8217;ll start running into really lengthy, excruciatingly detailed algorithms for, say, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#parse-a-time-component">parsing a time component</a>.  Or <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#history-traversal">moving through the browser&#8217;s history</a>.  Or <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#form-submission-algorithm">submitting a form</a>.  There&#8217;s an entire (long) <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html">chapter on how to process the HTML syntax</a>.
</p>
<p>
Those are all good things, actually.  They greatly increase the chances of interoperability actually happening within our lifetimes.  There&#8217;s no guessing about, well, much of anything.  It&#8217;s all been exactingly defined, to the extent that one can exactingly define anything using a human language.  A browser team doesn&#8217;t have to wonder, or even guess, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-end">what to do when the document has been completely parsed</a>.  It&#8217;s all spelled out.  And the people on those browser teams will, in the end, be the people who read that entire doorstop.  (Their sanity is another matter, and not discussed here.)
</p>
<p>
How is all that stuff relevant to you, the author?  In the sense that when browser teams follow the spec, their products will be interoperable, which is to say consistent.  (Just imagine that for a moment.)
</p>
<p>
Beyond that, though, the detailed implementation stuff <em>isn&#8217;t</em> relevant to you.  You are not expected to know all those algorithms in order to write HTML documents.  Pretty much all you need to know is the markup.  That&#8217;s the part that should be no more than 200 pages, yeah?
</p>
<p>
Turns out it is, and by a comfortable margin.  Michael(tm) Smith&#8217;s <a href="http://dev.w3.org/html5/markup/spec.html">HTML5: The Markup Language</a> is a version of the HTML5 draft with all of those eye-wateringly pedantic implementor sections stripped out, and when I generated a PDF it came in at 147 pages.  <em>That&#8217;s</em> what you really need in order to get up to speed on what&#8217;s in HTML5.  It&#8217;s <em>for</em> you.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/09/07/html5-and-you/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Nine Into Five</title>
		<link>http://meyerweb.com/eric/thoughts/2009/09/02/nine-into-five/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/09/02/nine-into-five/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 16:10:44 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1149</guid>
		<description><![CDATA[Like so many others, I had tried to dig into the meat of HTML5 and figure out just what the heck was going on.  Like so many others, I had come away with my head reeling from the massive length and depth of the often-changing specification, unsure of the real meaning of much of what I had read.  And like so many others, I had gone to read the commentary surrounding HTML5 and come away deeply dispirited by the confusion, cross-claims, and rancor I found.  Then I received an invitation to join a small, in-person gathering of like-minded people, many of them just as confused and dispirited as I, to turn our collective focus to the situation and see what we found.  I already had plans for the meeting's scheduled dates.  I altered the plans.]]></description>
			<content:encoded><![CDATA[<p>
Like so many others, I had tried to dig into the meat of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML5</a> and figure out just what the heck was going on.  Like so many others, I had come away with my head reeling from the massive length and depth of the often-changing specification, unsure of the real meaning of much of what I had read.  And like so many others, I had gone to read the commentary surrounding HTML5 and come away deeply dispirited by the confusion, cross-claims, and rancor I found.
</p>
<p>
Then I received an invitation to join <a href="http://www.flickr.com/photos/zeldman/sets/72157622014232906/">a small, in-person gathering</a> of like-minded people, many of them just as confused and dispirited as I, to turn our collective focus to the situation and see what we found.  I already had plans for the meeting&#8217;s scheduled dates.  I altered the plans.
</p>
<p>
Over two long days, we poked and prodded and pounded on the HTML5 specification&#8212;doing our best to figure out what was meant by, and what would result from, this phrase or that example; trying to reconcile seemingly arbitrary design choices with what we knew of the web and its history and the stated goals of the HTML5 specification; puzzling over the implications of example code and detailed algorithms and non-normative notes.
</p>
<p>
In the end, we came away with a better understanding of what&#8217;s going on, and out of that arose <a href="http://www.zeldman.com/superfriends/guide/">some concerns and suggestions</a>.  But in the main, we felt much better about what&#8217;s going on in HTML5, and have now <a href="http://www.zeldman.com/superfriends/">said so publicly</a>.
</p>
<p>
Personally, there are two markup changes I&#8217;d like most to see:
</p>

<ol>
<li>
<p>
<strong>The content model of <code>footer</code> should match that of <code>header</code>.</strong>
As others have said, the English-language name of the <code>footer</code> element creates expectations about what it is and how it should work.  As the spec now stands, most of those expectations will be wrong.  To wit: if your page&#8217;s footer includes navigation links, and especially if you have an HTML5-structured &#8220;<a href="http://ui-patterns.com/pattern/FatFooter">fat footer</a>&#8220;, you can&#8217;t use <code>footer</code> to contain it.
</p>
<p>
If this feels a little familiar, it should: the same problem happened with <code>address</code>, which was specified to mean only the contact information for the author of a page.  It was quite explicitly specified to <em>not</em> accept mailing addresses.  Of course, tons of people did just that, because they had an address and there was an <code>address</code> element, so of course they went together!
</p>
<p>
A lot of us cringed every time this came up in the last ten years of conducting training, because it meant we&#8217;d have to spend a few minutes explaining that the meaning of the element&#8217;s name clashed with its technical design.  We saw a lot of furrowed brows, rolled eyes, and derisively shaken heads.  That will be magnified a millionfold with <code>footer</code> if things are allowed to stand as they are.
</p>
<p>
As I said, the fix is simple: just change the content model of <code>footer</code> to state:
</p>
<blockquote><p>Flow content, but with no header or footer element descendants.</p></blockquote>
<p>
That&#8217;s exactly the same content model as <code>header</code>, and for the same reasons.
</p>
</li>
<li>
<p>
<strong><code>time</code> needs to be less restrictive.</strong>  That&#8217;s not very precise, I know.  But as things stand now, you can only apply <code>time</code> to Gregorian datetimes, and you&#8217;re not supposed to use it for anything that couldn&#8217;t be easily represented in a calendaring program.  The HTML5 specification says:
</p>
<blockquote><p>The time element is not intended for encoding times for which a precise date or time cannot be established.</p></blockquote>
<p>
That makes me wonder, in a manner not at <em>all</em> like Robert Plant, how precise do we have to be?  The answer, I&#8217;m sorry to say, is too much.
</p>
<p>
To pick an example: I have what I think of as <a href="http://meyerweb.com/eric/browsers/timeline-structured.html">a great use case for the <code>time</code> element</a>, and while it uses the Gregorian calendar, it&#8217;s only accurate to whole months (as is <a href="http://en.wikipedia.org/wiki/Browser_timeline#1993.E2.80.932009">Wikipedia&#8217;s version</a>).  In some cases I could get the values down to specific days; but in others, maybe not.  So I can&#8217;t use the <code>datetime</code> attribute, which <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#valid-date-string">requires at least year-month-day</a>, if not actual hours and minutes.  I could omit the attribute, and just have this:
</p>
<pre>
&lt;time&gt;October 2007&lt;/time&gt;
</pre>
<p>
In that case, the content has to be a valid date string in content&#8212;which is to say, a valid date string with optional whitespace.  So that won&#8217;t work.
</p>
<p>
I&#8217;ve pondered how best to tackle this, as did the Super Friends.  Our suggestion is to allow bare year and month-day values as permitted in ISO8601.  In addition, I think we should allow a valid date string to only require a year, with month, day, and time optional.  That seems good enough as long as we&#8217;re going to go with the idea that the Gregorian calendar contains all the time we ever want to structure.
</p>
<p>
But what about other, older dates, some of which are fairly precisely known within their own calendars?  On that point, though the historian in me clamors for a fix, I&#8217;m uncertain as to what.  <a href="http://quirksmode.org/" rel="acquaintance colleague met">PPK</a>, on the other hand, has put a<em>lot</em> of thought into this and written <a href="http://www.quirksmode.org/blog/archives/2009/04/making_time_saf.html">a piece</a> that I have skimmed but never, perhaps ironically, found the time to read in its entirety.
</p>

</li></ol>

<p>
These are not my only concerns, but they&#8217;re the big ones.  For the rest, I concur with <a href="http://www.zeldman.com/superfriends/guide/">the hiccups guide</a>, though of course to varying degrees.  I&#8217;m still trying to decide how much I care (or don&#8217;t) about the subtle differences between <code>article</code> and <code>section</code>, for example, or the way <code>aside</code> fits (or doesn&#8217;t) with its cousin elements.  And <code>dialog</code> just bugs me, but I&#8217;m not sure I have a better proposal, so I&#8217;ll leave it be for the time being.
</p>
<p>
At the other end of the two days, I felt a good deal more calm and hopeful than I did going in.  As <a href="http://www.zeldman.com/2009/08/31/loving-html5/">Jeffrey said</a>, &#8220;the more I study the direction HTML5 is taking, the better I like it&#8221;.  While there are still rough edges to be smoothed, there is time to smooth them.  We&#8217;ve already seen responsiveness on some of the points we addressed in the hiccups guide, and discussions around others.  The specification itself is daunting, especially to those who might remember the compact simplicity of the HTML2 spec.  Fortunately, it has good internal cross-linking so that you can, with effort, track down exactly what&#8217;s meant by &#8220;<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#valid-date-string-with-optional-time">valid date string with optional time</a>&#8221; or &#8220;<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#flow-content">sectioning content</a>&#8221; or &#8220;<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#formatblock-candidate"><code>formatBlock</code> candidate</a>&#8220;.
</p>
<p>
With HTML5, the web is not ending, nor is it starting over.  It&#8217;s evolving, slowly and in full view of the public, with an opportunity for anyone to have their say (which is not, of course, the same as having one&#8217;s proposals accepted).  It&#8217;s the next step, and I feel quite a bit more confident that it&#8217;s a step onto solid ground.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/09/02/nine-into-five/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
