<?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 &#187; Standards</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/category/tech/standards/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, 09 Feb 2012 18:37:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Unfixed</title>
		<link>http://meyerweb.com/eric/thoughts/2012/02/09/unfixed/</link>
		<comments>http://meyerweb.com/eric/thoughts/2012/02/09/unfixed/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 18:37:49 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1622</guid>
		<description><![CDATA[Vendor prefixes may soon be a thing of the past, and in the worst possible way.]]></description>
			<content:encoded><![CDATA[<p>Right in the middle of AEA Atlanta—which was <em>awesome</em>, I really must say—there were two announcements that stand to invalidate (or at least greatly alter) portions of the talk I delivered.  One, which I believe came out as I was on stage, was the publication of <a href="http://www.w3.org/TR/2012/WD-css3-positioning-20120207/">the latest draft of the CSS3 Positioned Layout Module</a>.  We’ll see if it triggers change or not; I haven’t read it yet.</p>

<p>The other was the publication of <a href="http://lists.w3.org/Archives/Public/www-style/2012Feb/0313.html">the minutes of the CSS Working Group meeting in Paris</a>, where it was revealed that several vendors are about to support the <code>-webkit-</code> vendor prefix in their own very non-WebKit browsers.  Thus, to pick but a single random example, Firefox would throw a drop shadow on a heading whose entire author CSS is <code>h1 {-webkit-box-shadow: 2px 5px 3px gray;}</code>.</p>

<p>As an author, it sounds good as long as you haven’t really thought about it very hard, or if perhaps you have a very weak sense of the history of web standards and browser development.  It fits right in with the recurring question, “Why are we screwing around with prefixes when vendors should just implement properties completely correctly, or not at all?”  Those idealized end-states always sound great, but years of evidence (and reams upon reams of bug-charting material) indicate it’s an unrealistic approach.</p>

<p>As a vendor, it may be the least bad choice available in an ever-competitive marketplace.  After all, if there were a few million sites that you could render as intended if only the authors used your prefix instead of just one, which would you rather: embark on a protracted, massive awareness campaign that would probably be contradicted to death by people with their own axes to grind; or just support the damn prefix and move on with life?</p>

<p>The practical upshot is that browsers “supporting alien CSS vendor prefixes”, <a href="http://www.netmagazine.com/news/css-vendor-prefixes-threaten-open-web-121757">as Craig Grannell put it</a>, seriously cripples the whole concept of vendor prefixes.  It may well reduce them to outright pointlessness.  I am <a href="http://alistapart.com/articles/prefix-or-posthack/">on record as being a fan of vendor prefixes</a>, and furthermore as someone who advocated for the formalization of prefixing as a part of the specification-approval process.  Of course I still think I had good ideas, but those ideas are currently being sliced to death on the shoals of reality.  Fingers can point all they like, but in the end what matters is what happened, not what should have happened if only we’d been a little smarter, a little more angelic, whatever.</p>

<p>I’ve seen a proposal that vendors agree to only support other prefixes in cases where they are un-prefixing their own support.  To continue the previous example, that would mean that when Firefox starts supporting the bare <code>box-shadow</code>, they will also support <code>-webkit-box-shadow</code> (and, one presumes, <code>-ms-box-shadow</code> and <code>-o-box-shadow</code> and so on).  That would mitigate the worst of the damage, and it’s probably worth trying.  It could well buy us a few years.</p>

<p>Developers are also trying to help repair the damage before it’s too late.  Christian Heilmann has <a href="http://christianheilmann.com/2012/02/09/now-vendor-prefixes-have-become-a-problem-want-to-help-fix-it/">launched an effort to get GitHub-based projects updated</a> to stop being WebKit-only, and Aarron Gustafson <a href="http://blog.easy-designs.net/archives/2012/02/09/this-must-not-happen/">has published a UNIX command to find all your CSS files containing <code>webkit</code></a> along with a call to update anything that’s not cross-browser friendly.  Others are making similar calls and recommendations.  You could use <a href="http://leaverou.github.com/prefixfree/">PrefixFree</a> as a quick stopgap while going through the effort of doing manual updates.  You could make sure your CSS pre-processor, if that’s how you swing, is set up to do auto-prefixing.</p>

<p>Non-WebKit vendors are in a corner, and we helped put them there.  If the proposed prefix change is going to be forestalled, we have to get them out.  Doing that will take a lot of time and effort and awareness and, above all, widespread interest in doing the right thing.</p>

<p>Thus my fairly deep pessimism.  I’d love to be proven wrong, but I have to assume the vendors will push ahead with this regardless.  It’s <a href="http://meyerweb.com/eric/thoughts/2008/01/24/almost-target/">what we did at Netscape ten years ago</a>, and almost certainly would have done despite any outcry.  I don’t mean to denigrate or undermine any of the efforts I mentioned before—they’re absolutely worth doing even if every non-WebKit browser starts supporting <code>-webkit-</code> properties next week.  If nothing else, it will serve as evidence of your commitment to professional craftsmanship.  The real question is: how many of your fellow developers come close to that level of commitment?</p>

<p>And I identify that as the real question because it’s the question vendors are asking—<em>must</em> ask—themselves, and the answer serves as the compass for their course.</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2012/02/09/unfixed/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>CSS Editors Leaderboard</title>
		<link>http://meyerweb.com/eric/thoughts/2011/02/04/css-editors-leaderboard/</link>
		<comments>http://meyerweb.com/eric/thoughts/2011/02/04/css-editors-leaderboard/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 20:15:29 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1478</guid>
		<description><![CDATA[My attempt to rank the various editors of CSS modules based on the current process status of their modules, how current the modules are, and so on.]]></description>
			<content:encoded><![CDATA[<p>I recently decided to create a <a href="http://meyerweb.com/eric/css/editors/">CSS Editors Leaderboard</a>, which is my attempt to rank the various editors of CSS modules based on the current process status of their modules, how current the modules are, and so on.  It&#8217;s kind of a turn of the wheel for me, given that I started out my CSS career with browser support leaderboards.  Now you can see who&#8217;s amassed the most spec points, and who&#8217;s made the most effective use of their time and energy.  Who knows?  Maybe some editors will try to game the system by pushing their specs along the process track.  That&#8217;d be just <em>awful</em>.</p>

<p>One thing of note: I decided to write the leaderboard script so that it directly parses an HTML file to figure out the rankings.  You can <a href="http://meyerweb.com/eric/css/editors/editors.html">see the file yourself</a>, if you like.  At the moment it&#8217;s just a bunch of <tt>dl</tt>s, but at some point I suspect I&#8217;ll convert it to a table.  The advantage is that it&#8217;s easier for other people to fact-check the source data this way: just load it up in a browser.</p>

<p>I thought about just parsing specs directly but it seemed like overkill to load the entirety of the CSS2.1 module just to figure out the process status, publication date, and editor list.  And then do that same thing for every one of the 38 tracked modules.  This way I have the leaderboard <em>and</em> a central summary of the modules&#8217; status, and hopefully the latter will be even more human-readable in the future.</p>

<p>Anyway, it was a fun little project and now it&#8217;s loose in the world.  Enjoy.</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2011/02/04/css-editors-leaderboard/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Vendor Prefix Lists</title>
		<link>http://meyerweb.com/eric/thoughts/2010/10/08/vendor-prefix-lists/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/10/08/vendor-prefix-lists/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 15:51:19 +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=1386</guid>
		<description><![CDATA[At the prompting of an inquiry from a respected software vendor, I asked The Twitters for pointers to "canonical" lists of vendor-prefixed properties, values, and selectors.  Here's what the crowd sourced at me.]]></description>
			<content:encoded><![CDATA[<p>
At the prompting of an inquiry from a respected software vendor, <a href="https://twitter.com/meyerweb/status/26579041578">I asked The Twitters</a> for pointers to &#8220;canonical&#8221; lists of vendor-prefixed properties, values, and selectors.  Here&#8217;s what the crowd sourced at me:
</p>

<ul>
	<li><a href="http://msdn.microsoft.com/en-us/library/ms531207(VS.85).aspx">Microsoft</a><sup>†</sup></li>
	<li><a href="https://developer.mozilla.org/en/CSS_Reference/Mozilla_Extensions">Mozilla</a></li>
	<li><a href="http://www.opera.com/docs/specs/presto26/css/o-vendor/">Opera</a></li>
	<li><a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html">Safari</a><sup>†</sup></li>
</ul>

<p class="note"><sup>†</sup>Lists more than just prefixed properties, values, and so on.</p>
<p>
While there&#8217;s no guarantee of completeness or accuracy, these are at least what the vendors themselves provide and so we can cling to some hope of both.  I was also pointed to the following third-party lists:
</p>

<ul>
<li><a href="http://peter.sh/experiments/vendor-prefixed-css-property-overview/">Vendor-prefixed CSS Property Overview &laquo;  Peter Beverloo</a></li>
<li><a href="http://qooxdoo.org/documentation/general/webkit_css_styles">qooxdoo &raquo; WebKit CSS Styles</a></li>
<li><a href="http://css-infos.net/properties/webkit.php">CSS Infos : Webkit CSS Properties</a></li>
<li><a href="http://css-infos.net/properties/firefox.php">CSS Infos : Firefox CSS Properties</a></li>
</ul>

<p>
If you know of great vendor-prefix lists that aren&#8217;t listed here, particularly anything from the vendors themselves, please let us know in the comments!
</p>

<p>
Somewhat if not obviously related: does anyone know of a way to add full Textile support to BBEdit 9.x?  Having it be a Unix filter is fine.  I know BBEdit already supports Markdown, but since Basecamp uses Textile and lots of people I work with use Basecamp, I&#8217;d like stick to one syntax rather than confuse myself trying to switch between two similar syntaxes.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/10/08/vendor-prefix-lists/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>In Defense of Vendor Prefixes</title>
		<link>http://meyerweb.com/eric/thoughts/2010/07/07/in-defense-of-vendor-prefixes/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/07/07/in-defense-of-vendor-prefixes/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:53:44 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1360</guid>
		<description><![CDATA[In a fairly quick <cite>A List Apart</cite> article, I make the case that vendor prefixes are not only good, they have the potential to be great <em>and</em> to deliver greater interoperability and advancement of CSS.]]></description>
			<content:encoded><![CDATA[<a href="http://alistapart.com/articles/prefix-or-posthack/"><img src="http://meyerweb.com/pix/2010/prefix-or-posthack-crop.png" alt="" class="pic left" /></a>
<p>
&#8230;that having been the original working title for &#8220;<a href="http://alistapart.com/articles/prefix-or-posthack/">Prefix or Posthack</a>&#8220;, my latest article for <a href="http://alistapart.com/">A List Apart</a>.  (Sort of like <cite>Return of the Jedi</cite> had a working title of <cite>Blue Harvest</cite>.)  In a fairly quick read, I make the case that vendor prefixes are not only good, they have the potential to be great <em>and</em> to deliver greater interoperability and advancement of CSS.
</p>
<p>
So far the reaction has been overwhelmingly positive, which frankly came as a bit of a surprise.  The annoyance factor of prefixes is undeniable, and it&#8217;s been my experience that annoyance dramatically hardens opposition regardless of whether or not there are good reasons to oppose.  I could flatter myself that the agreement is due to the Obvious Rightness of my argument, but I suspect it&#8217;s actually that I merely articulated what most people had already instinctively decided for themselves.  Which isn&#8217;t a bad place to be.
</p>
<p>
Anyway, if you haven&#8217;t already, feel free to decide for yourself by <a href="http://alistapart.com/articles/prefix-or-posthack/">reading the article</a>—which, I feel like mentioning for no clear reason, is only the fourth piece I&#8217;ve ever written for ALA.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/07/07/in-defense-of-vendor-prefixes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The Web Stack</title>
		<link>http://meyerweb.com/eric/thoughts/2010/05/19/the-web-stack/</link>
		<comments>http://meyerweb.com/eric/thoughts/2010/05/19/the-web-stack/#comments</comments>
		<pubDate>Wed, 19 May 2010 14:43:00 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/?p=1343</guid>
		<description><![CDATA[Following on <a href="http://meyerweb.com/eric/thoughts/2010/05/07/web-2-0-talk-html5-vs-flash/">my "HTML5 vs. Flash" talk</a> of a couple of weeks ago, I'm hoping to do a bit of blogging about HTML5, Flash, mobile apps, and more.  But first I need to get some terminology straight.]]></description>
			<content:encoded><![CDATA[<p>
Following on <a href="http://meyerweb.com/eric/thoughts/2010/05/07/web-2-0-talk-html5-vs-flash/">my &#8220;HTML5 vs. Flash&#8221; talk</a> of a couple of weeks ago, I&#8217;m hoping to do a bit of blogging about HTML5, Flash, mobile apps, and more.  But first I need to get some terminology straight.
</p>
<p>
As I did in my talk, I&#8217;m going to refer to the collection of front-end web-standards technologies—(X)HTML (of any flavor), CSS, and JavaScript—as &#8220;the web stack&#8221;.  I&#8217;ve seen the term used here and there and it makes the most sense to me as a condensed verbal shorthand.  It beats writing out the specific technologies every time or trying to use similarly clumsy constructions like &#8220;front-end tech&#8221;.  If you like, think of &#8220;web stack&#8221; as a rough equivalent to &#8220;Ajax&#8221;—a term that was invented because continually saying &#8220;asynchronous JavaScript + CSS + DOM + XMLHttpRequest&#8221; was unworkable.
</p>
<p>
The web stack sort of includes downloadable fonts, but only in the same sense that images or any other external resource is part of the stack.  SImilarly, it encompasses frameworks like jQuery in the sense that they&#8217;re built out of the components of the web stack.
</p>
<p>
When I use the term &#8220;web stack&#8221;, though, I&#8217;m not referring to back-end technologies.  Those things are important, certainly, but not from the front-end point of view.  A browser doesn&#8217;t care if your page was generated by PHP, Django, Rails, Perl, or what have you.  It doesn&#8217;t even care if the server runs on Apache or something else.
</p>
<p>
Furthermore, it doesn&#8217;t refer to plugins.  Yes, that means Flash, but it also means QuickTime, Real, ActiveX, and so forth.  What I need to make clear is that I&#8217;m not doing this in an attempt to imply that plugins don&#8217;t belong on the web at all.  They&#8217;re just not part of that core web stack any more than the web stack is part of them.  That doesn&#8217;t stop them working together, obviously.
</p>
<p>
Okay, so that&#8217;s out of the way, and I hope my meaning is sufficiently clear to everyone.  Please do leave a comment if it isn&#8217;t.  Onward!
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2010/05/19/the-web-stack/feed/</wfw:commentRss>
		<slash:comments>44</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>&#8216;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>1</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>&#8216;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>18</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>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>
		<item>
		<title>CSS3 Feedback: Graphical Thoughts</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/24/css3-feedback-graphical-thoughts/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/02/24/css3-feedback-graphical-thoughts/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 14:35:20 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1073</guid>
		<description><![CDATA[My few thoughts on the "<a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#graphical">Graphical Effects</a>" part of the feedback document.]]></description>
			<content:encoded><![CDATA[<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>

<p>
My few thoughts on the &#8220;<a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#graphical">Graphical Effects</a>&#8221; part of the feedback document.  A lot of what was mentioned by the community is already in the pipeline, so there&#8217;s not a lot to say about those except &#8220;hurry &#8216;em up, willya?&#8221;.
</p>

<p>
<strong>Gradients</strong> &#8212; like rounded corners, no surprise these came up.  (All we need is to define <code>wet-floor-reflect</code> and we&#8217;ll complete the Web 2.0 design tricks hat trick.)  I&#8217;d like to see them myself, and I don&#8217;t think defining them is quite as hard as the commentary implies:
</p>
<p>
<blockquote><p>Imagine, for example, applying a gradient to the text of a &lt;span&gt; broken across two lines. Do you apply the gradient to each part individually? Glue them together as if they were all on one line first? Draw a rectangle around both parts and apply the gradient to that? (<a href="http://www.w3.org/TR/css3-background/#the-background-break">CSS3 Backgrounds and Borders</a> has a control for this.)</p></blockquote>

</p><p>
I&#8217;d say the answer is right there, in the form of <a href="http://www.w3.org/TR/css3-background/#the-background-break"><code>background-break</code></a>, but let&#8217;s assume for a moment that said property never existed and we still had to deal with this problem.  I can think of two solutions:
</p>

<ol>
<li>Only allow gradients to be applied to non-inline boxes.  This would not be my preference, but it could be so defined.  There&#8217;s already precedence with CSS for that sort of limitation:  <code>width</code>, <code>height</code>, <code>text-align</code>, and other properties are restricted to non-inline boxes.</li>
<li>Treat gradients the way backgrounds and borders are already treated on inline boxes.  I&#8217;d be much more in favor of this.  In other words, lay out the inline box as though it is all on one line and then break it in pieces as needed to fit into the actual text flow.  (This is the behavior of <code>continuous</code>, the default value of <code>background-break</code>.)</li>
</ol>

<p>
But since <code>background-break</code> exists, you just treat gradients as you would any other background in accordance with <code>background-break</code>&#8216;s definitions.
</p>
<p>
The somewhat trickier problem is how to define the value syntax for <code>background-gradient</code> so that&#8217;s both powerful and extensible without being unusable.  I think that&#8217;s solvable, but not easily, and probably not in a way that will satisfy everyone.
</p>
<p>
(Though this would be a fabulous place for the cardinal-point values from pre-CSS1 days, which you can still find in the specification if you look hard enough, to make a roaring comeback, wouldn&#8217;t it?)
</p>
<p>
<strong>Unidirectional background repeats</strong> &#8212; I say yes.  Here, have some values: <code>repeat-up</code>, <code>repeat-right</code>, <code>repeat-down</code>, and <code>repeat-left</code>.  In each case, the image would be repeated in the indicated direction from the origin image (the one placed by <code>background-position</code>).  Ironically, really old versions of IE did half of this by not correctly supporting <code>repeat-x</code> and <code>repeat-y</code>, treating them instead as if they were <code>repeat-right</code> and <code>repeat-down</code>.
</p>
<p>
There are occasions where this would be very useful, especially if you can combine the values into something like <code>repeat-down repeat-right</code>, and <em>most</em> especially in conjunction with multiple backgrounds.  So you could put an image stripe across the top of the element background, another one down the left side, and then fill in the rest of the background with a <code>repeat-down repeat-right</code> image.  Not a particularly common case, but the only way to handle it at present is with multiple nested elements, each with its own background and possibly a lot of negative margin trickery, and nobody wants that.  (Which may also be why it isn&#8217;t a particularly common case.)
</p>
<p>
You could also put an image in the center of your page and then a single stripe that goes only downward from behind it.  Like a golf ball on a tee, say; or a tree trunk below the leafy crowm; or a stem from a flower.
</p>
<p>
<strong>Slanted corners</strong> &#8212; sure, why not?  The issues are all the same as with rounded corners; the only difference is that you have a flat corner instead of a rounded one.  It makes joins between different borders styles/colors more obvious, but that&#8217;s a good thing: any solution that works well for the slant corner should work as well for the rounded corner.  Besides, if we&#8217;re already going to the effort of rounding corners, this seems like a pretty easy add-on.
</p>
<p>
<strong>Multiple borders</strong> &#8212; I think this would be quite useful.  I occasionally fake this with a border and an outline (as in my <a href="http://meyerweb.com/eric/tools/css/diagnostics/">diagnostic styles</a>) but that only works for two; if you want three or more nested borders (or two or more in IE/Win) you have to start nesting elements.  Also, having multiple borders lets you define your own gradient borders like you were a pixel artist, and who doesn&#8217;t like pixel artists?
</p>
<p>
At the same time, though, I do feel that this should be fairly low on the implementation totem pole.  And, as pointed out in the document, if image borders get implemented then a lot of the need for multiple borders goes away.
</p>
<p>
<strong>Alpha channel image masks</strong> &#8212; the problem I have here is what happens if you, say, try to use an image to alpha-mask a non-replaced element?  How does it scale?  Or does it?  Will there be a <code>mask-stretch</code> property?  Who really wants to stretch an image over a great big <code>div</code> anyway?  (From a visual-results point of view, I mean.)
</p>
<p>
Allowing masks might help in figuring out how to do non-rectangular float areas, in that you could use the alpha image to define the area used for float exclusion.  Combine that with a stretch ability and SVG support, so you can draw scalable vector masks, and I think you&#8217;re really getting somewhere.  (As does <a href="http://mattwilcox.net/">Matt Wilcox</a>; he and I have been chewing this over in <a href="http://meyerweb.com/eric/thoughts/2009/02/19/css3-feedback-animated-shapes/#postcomment">the comments</a> on <a href="http://meyerweb.com/eric/thoughts/2009/02/19/css3-feedback-animated-shapes/">the previous post in the series</a>.)
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/02/24/css3-feedback-graphical-thoughts/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>CSS3 Feedback: Animated Shapes</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/19/css3-feedback-animated-shapes/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/02/19/css3-feedback-animated-shapes/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 17:00:24 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1055</guid>
		<description><![CDATA[The portion of the feedback <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#shapes">devoted to shapes</a> had two overarching themes, as I saw it.]]></description>
			<content:encoded><![CDATA[<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>

<p>
The portion of the feedback <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#shapes">devoted to shapes</a> had two overarching themes, as I saw it.  That makes this entry a bit short, but when I tried to combine it with my feedback on &#8220;<a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#graphical">Graphical Effects</a>&#8220;, it quickly got too long.  So, a little <i>amuse cerveau</i>, as it were.
</p>

<p>
<strong>Animations, transformations, and so on</strong> &#8212; the WebKit team have of course been having a field day in this area, and what they&#8217;ve done will likely make is way to other browsers.  Or not.  I don&#8217;t know.  I&#8217;m not entirely thrilled about the effort that&#8217;s gone into those properties when there are so many other, more basic things that need love and care, but there&#8217;s no denying the essential coolness of slowly rotating an entire page.  Which I totally need to do the next time I give a presentation.
</p>
<p>
I&#8217;m not going to get into the &#8220;these things are behavior and therefore JavaScript!&#8221; argument.  CSS already does behavior (think <code>:hover</code>) and it&#8217;s going to do more over time.  I don&#8217;t see how that historical pressure can be resisted for much longer, short of outright refusing to take on any more behaviors and thus making itself a prime candidate for replacement with something else.  We may as well do our best to make sure CSS does good behaviors well, in ways that makes the most sense to the most authors.
</p>
<p>
So that&#8217;s basically my feedback: since we&#8217;re going to do it, let&#8217;s do it right.  Apple&#8217;s made a start, and unless the syntax they&#8217;ve defined in <a href="http://dev.w3.org/csswg/css3-animations/">their CSS Animations draft</a> is completely unworkable in other browsers for technical reasons, then let&#8217;s just roll with it.  And please note I said the <em>syntax</em>, not the overall concept.  (Ditto for <a href="http://webkit.org/specs/CSSVisualEffects/CSSTransforms.html">their CSS Transforms draft</a>.)
</p>

<p>
<strong>Stuff that isn&#8217;t rectangular</strong> &#8212; including both polygonal element boxes and polygonal floats.  I&#8217;ve wanted these for at least a decade, so it&#8217;s little surprise that I&#8217;m in favor.  <a href="http://meyerweb.com/eric/css/edge/raggedfloat/demo.html">Ragged floats</a> were invented as a hack to make the latter happen, of course, and the basic idea&#8217;s been <a href="http://www.evolt.org/article/Super_Ragged_Floats/22/50410/index.html">improved upon</a> <a href="http://www.alistapart.com/articles/sandbags">more than once</a>.
</p>
<p>
The tricky part, of course, is actually defining polygons.  Regular polygons, as in hexagons and octagons and dodecagons, are not terribly difficult; but creating an irregular polygon requires defining a set of point coordinates in relation to some origin and resolving what happens when the lines cross over each other and&#8230; well, yeah.
</p>
<p>
The build-on-what-exists approach would just adopt the syntax HTML <a href="http://www.w3.org/TR/REC-html40/struct/objects.html#edef-AREA"><code>area</code> </a>elements use in the <code>coords</code> elements.  There would be two interesting questions there, which are what happens with negative coordinate values, and what happens if you draw a polygon that cuts through some of the element&#8217;s content.  For example, you have a <code>div</code> containing an image, and you define the polygon to be smaller (in places) than the image.  Is the browser obligated to prevent content overlap in such cases?  I would tend to say no but I can see arguments for the opposite view, particularly when it comes to floats.
</p>
<p>
Then there&#8217;s the problem that you&#8217;d have to define a separate polygon for every element that needed a non-rectangular float, as Bert Bos notes in <a href="http://www.w3.org/blog/CSS/2007/07/03/rotations_and_non_rectangular_floats">his thoughts on the topic</a> from a couple of years ago.  His <code>contour</code> idea is certainly interesting, though I&#8217;d then start to wonder how you define a contour point on, say, an irregular faded gradient.
</p>
<p>
Anyway, I thought about adapting <code>clip</code> to the purpose of defining float polygons, but then I remembered the long, tortuous hell that is the history of <code>clip</code> (and <code>offset-clip</code>) and decided that a new property is the way to go.  Clean break, start fresh, et cetera.  I don&#8217;t know what it would be called.  <code>content-shape</code>, maybe, to go with <code>element-shape</code>.  Or not.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/02/19/css3-feedback-animated-shapes/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Wanted: Layout System</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/17/wanted-layout-system/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/02/17/wanted-layout-system/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:00:14 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1052</guid>
		<description><![CDATA[Not surprisingly, there was a lot of community feedback <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#layout">asking for better layout mechanisms</a>.  Actually, people were asking for any decent layout mechanism at all, which CSS has historically lacked.  It needs one.]]></description>
			<content:encoded><![CDATA[<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>
<p>
Not surprisingly, there was a lot of community feedback <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#layout">asking for better layout mechanisms</a>.  Actually, people were asking for any decent layout mechanism at all, which CSS has historically lacked.  Floats mostly work, but they&#8217;re a hack and can be annoyingly fragile even when you ignore old-browser bugs.  Positioning works in limited cases, but does not handle web-oriented layout at all well.
</p>
<p>
Why do we use floats for layout, anyway?  <code>clear</code>.  That&#8217;s pretty much the whole answer.  The unique in-flow/out-of-flow nature of floats means they interact with each other and with the normal flow, which means they can be cleared, which makes them useful.  Because with <code>clear</code>, we can float layout blocks around and then push other non-floated blocks, like footers, below the floats.
</p>
<p>
Positioning, of course, permits total layout freedom in the sense that you can put a layout block anywhere with respect to its containing block.  The downfall is that absolutely positioned elements are entirely out of the normal flow, so they can&#8217;t stay out of each others&#8217; way like floats do, and you can&#8217;t clear anything with respect to a positioned element.  If there had been a <code>position-clear</code> or its equivalent from the outset, we&#8217;d never have bothered with floats.
</p>
<p>
(And if we can just add <code>position-clear</code> to CSS, that would be completely awesome.  It&#8217;s <a href="http://www.shauninman.com/archive/2006/05/22/clearance_position_inline_absolute">been done with JavaScript</a> and it will most likely be done again and better.  It wouldn&#8217;t even be that hard to implement, at least for 99.5% of cases.)
</p>
<p>
All this is why the old &#8220;only use tables for layout&#8221; argument keeps coming up over and over: strip away the overheated rhetoric and obvious link-baiting, and you find the core of a real need.  Because as powerful as CSS can be, table cells do certain things very easily that CSS makes very, very hard.  Cells stretch vertically, keeping equal heights as a matter of their intrinsic nature.  They stay out of each others&#8217; way, while still being allowed to sit next to each other and use any sizing dimensions.  They tie their layout to their parent elements, and vice versa.
</p>
<p>
There are <em>no</em> equivalents in CSS.  There have been various very clever attempts to replicate bits and pieces of those capabilities using CSS.  What CSS does, it does very well: if you don&#8217;t need equal-height layout blocks, then no problem.  If you do, it&#8217;s a massive pain.  Clever techniques provide substitutes, but can&#8217;t replace what tables already do.
</p>
<p>
And please, let&#8217;s put the whole &#8220;<code>display: table-cell</code> will grant those abilities through CSS&#8221; to rest.  Saying that is just saying &#8220;use tables for layout&#8221; with different words.  Turning a bunch of <code>div</code>s or list items or whatever into table-role boxes is no better than just using table markup in the first place, and it&#8217;s arguably worse.  Using element names other than <code>table</code> and <code>td</code> to create layout tables, and then claiming it&#8217;s not using tables for layout, borders on self-deception.
</p>
<p>
Not to mention doing things that way means you&#8217;re doing your layout in a highly source-order-dependent fashion, which was one of the things about table layout we were trying to get away from in the first place.
</p>
<p>
So how do we get really powerful source-order-independent layout?  I wish I knew.  The <a href="http://www.w3.org/TR/css3-layout/">Advanced Layout module</a> has been sitting around for a while now, and even if you&#8217;re a fan of defining layout as ASCII art&#8212;which I find repels and appeals in equal measure, but that&#8217;s probably just me&#8212;there appears to be close to zero implementor interest.  So how do we get those abilities in a form that implementors will, y&#8217;know, <em>implement</em>?  I don&#8217;t know.  I don&#8217;t <em>care</em>.  We just need it, and have needed it for a good decade or so.  Without it, CSS is a styling language but not a layout language.  We&#8217;ve bent it into being something close to a layout language, which is nice but not really ideal.
</p>
<p>
Maybe CSS isn&#8217;t the place for this.  Maybe there needs to be a new layout language that can be defined and implemented without regard to the constraints of the existing CSS syntax rules, without worrying about backwards compatibility.  Maybe that way we can not only get strong layout but also arbitrary shapes, thus leaving behind the rectangular prison that&#8217;s defined the web for almost two decades.
</p>
<p>
I don&#8217;t have a concrete idea to propose here, because it&#8217;s not up to us any more.  A solution was worked out over the course of several years and then found wanting by the implementors.  Really, it&#8217;s up to the implementors to figure it out now.  I personally would like to just lock the browser teams from Microsoft, Mozilla, Opera, and Apple in a room and not let them out until they&#8217;ve defined something that works and they&#8217;ve all agreed to implement soonest.  I might even supply food and water.
</p>
<p>
And yes, I just advocated doing this outside the W3C process.  Why wouldn&#8217;t I?  The process has, in the last decade, not produced anything even remotely resembling an answer to this problem.  Time to try another path and see if it gets any closer to the goal.
</p>
<p>
No doubt someone&#8217;s going to spin this as &#8220;See, even noted standards zealot Eric Meyer now says CSS is flawed!&#8221;&#8212;only they&#8217;ll be wrong because this isn&#8217;t a <em>now</em> thing.  I&#8217;ve been saying this for years in interviews, in person, and in general.  Any time someone asks me what CSS is missing or should do better, the answer has always been a variant on &#8220;a strong layout system&#8221;.  I&#8217;ve been saying it for at least a decade.  So I&#8217;m not saying it <em>now</em>.  I&#8217;m saying it <em>again</em>.  And again and again and again and&#8230;
</p>
<p>
If I sound frustrated, it&#8217;s because I am, and have been for a good long while.  I&#8217;m not the only one.  It rankles to have CSS be, as Winston Churchill would have put it, the worst form of layout except for all the others that have been tried.
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/02/17/wanted-layout-system/feed/</wfw:commentRss>
		<slash:comments>131</slash:comments>
		</item>
		<item>
		<title>CSS3 Feedback: Layout</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 17:01:42 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1043</guid>
		<description><![CDATA[In this round, layout.  Not all of it, but the bits that struck me as either really useful or really, really way too long overdue.]]></description>
			<content:encoded><![CDATA[<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>
<p>
In this round, <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#layout">layout</a>.  Not all of it, but the bits that struck me as either really useful or really, really way too long overdue.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#contain-floats">Float containment</a> &#8211;</strong> yes, we need a property that does just that.  As long as we&#8217;re tied to floats for layout&#8212;and I plan to rant about that soon&#8212;there should be a clear, unambiguous, intentionally defined property that tells elements to wrap themselves around floated descendant elements.  <code>overflow</code> works in most cases but can fall down in unusual circumstances (I&#8217;ve seen scrollbars appear where none were actually needed) and anyway, it wasn&#8217;t intended to provide the wrapping effect in the first place.  That it does so is a happy side effect, but it&#8217;s still a side effect.  The rest of the float-wrapping techniques are even more convoluted.  &#8220;There are already ways to do that so we don&#8217;t need a property&#8221; is rather like saying &#8220;we can already do layout with tables so why do we need CSS layout?&#8221;.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#center-positioning">Positioning by center</a> &#8211;</strong> yes, please.  The way to center an absolutely positioned element within its containing block is to set the <code>top</code> and <code>left</code> to <code>50%</code> each and then define negative top and left margins that are half the positioned element&#8217;s height and width.  That&#8217;s just awful, and requires at least an explicit width, if not an explicit height.  When I did the structured timeline, here&#8217;s how I got the version numbers to center below the dots:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%;
	width: 2.1em;
	margin: -5px 0 0 -1em;
}
</pre>

<p>
See that <code>-1em</code> left margin, and the <code>2.1em</code> width?  Just to get the center of positioned elements&#8217; boxes sit on top of a certain left offset (defined elsewhere in the CSS).  Ditto the negative top margin, to pull it upward just enough so that the elements&#8217; boxes would have the point five pixels down from their tops line up with the vertical midpoint of their containing blocks.
</p>
<p>
I wanted to do something like this:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%;
	position-anchor: 50% 5px;
}
</pre>

<p>
That would have said that the point in the center of the absolutely positioned element should be placed at the point in the containing block 21.7% down from the top and 44% of the way across from the left.  That would hang the positioned element&#8217;s center on that point, <em>regardless of the size of the positioned element</em>&#8212;note that I took out the <code>width</code>.  I could stop defining explicit sizes and just let the elements be the size they want to be to show their content.
</p>
<p>
The problem is that approach doesn&#8217;t fit at all well with the way positioning layout is defined.  Suppose I said this:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%; bottom: 0;
	left: 50%; right: 25%;
	position-anchor: 50% 5px;
}
</pre>

<p>
Now what?  I&#8217;m not even sure myself.  Maybe define rename it to <code>position-offset</code> and define percentages to be relative to the height and width of the positioned element (not its containing block), so that it doesn&#8217;t interact directly with the offset properties like <code>top</code> and <code>right</code>?
</p>
<p>
All I want is a way to hang elements off of offset points, and not be restricted to the corners of the elements, and have the solution work even when the elements have automatic height and width, and not require extra markup to make it happen.  Oh, and a ponycar.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#box-sizing">Box sizing</a> &#8211;</strong> what in the nine hells of Valeria is taking so long?  We needed that one ten years ago.  I no longer care if it&#8217;s done as its own property or as new keywords on <code>height</code> and <code>width</code>.  I just want it.  Someone will make it happen, with or without the WG or implementors&#8212;<a href="http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will-save-us-all/">mark my words</a>.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#siblings-equal-height">Same-height elements</a> &#8211;</strong> yes, a way to tie element heights (whether they&#8217;re siblings or not) together would be welcome, although I can see how specifying it in an implementable would be tricky; no, <code>display: table-cell</code>  is <em>not</em> the answer.  Soon I will rant about this.  Soon.
</p>
]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>CSS3 Feedback: Selector Blocks</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/12/selector-blocks/</link>
		<comments>http://meyerweb.com/eric/thoughts/2009/02/12/selector-blocks/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 15:37:05 +0000</pubDate>
		<dc:creator>Eric Meyer</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://meyerweb.com/?p=1034</guid>
		<description><![CDATA[Out of all the <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#selectors">selector feedback</a>, <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#nested-selectors">selector blocks</a> was the part that really caught my attention.]]></description>
			<content:encoded><![CDATA[<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>
<p>
Out of all the <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#selectors">selector feedback</a>, <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#nested-selectors">selector blocks</a> was the part that really caught my attention.  I also see the usefulness of a <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#parent-selector">parent selector</a>, but that one has come up many times before, and it&#8217;s always died at the doorstep of implementors, who point out that it&#8217;s far too difficult to implement without serious performance penalties and even risk of browser lockup.  See, for example, <a href="http://shauninman.com/archive/2008/05/05/css_qualified_selectors#comment_3942">the comment left by David Hyatt</a> on <a href="http://shauninman.com/archive/2008/05/05/css_qualified_selectors">Shaun Inman&#8217;s post</a> on the idea.  Similarly, I think <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#contants">constants</a> (or macros or whatever they&#8217;re called) are a great idea and would be very helpful, especially if you&#8217;re coding up a <a href="http://jasonsantamaria.com/" rel="friend colleague met">Jason</a> Special.  Both are loaded with use cases, so I don&#8217;t feel like I can add a lot; besides, constants are already in the WG charter, so there&#8217;s once more hope in the land.
</p>
<p>
So anyway, selector blocks.  To pick one recent example, while working on a project that should very soon see the light of day, I had a situation involving the following chunk of rules.
</p>

<pre>h1, h2, h3, h4, h5, h6, table {
   font: 1em Arial, "Helvetica Neue", Helvetica, sans-serif;}
h1 {font-size: 275%;}
h3:first-child {margin-top: 1em;}
p.tagline {margin: -0.25em 0 1.25em;
   font-size: 125%;
   color: #7B7960;}
h3 {margin: 1.5em 0 0.25em; font-size: 125%;}
h3:before {font-size: 75%; counter-increment: subhead;}
h4 {margin: 2.5em 0 0.75em;
   text-transform: uppercase; font-size: 125%;
   color: #928F59;}
p {margin: 0 0 1em;}
ul {padding-left: 1.5em;}
ul li {list-style: disc; margin: 0.5em 0;}
</pre>

<p>
Nothing unusual about them, of course, unless you count my use of counters.  These rules had been written early on in development, and the design had evolved around that part of the document.  As more page components were added, I realized that I needed to scope all these rules to one section of the document: specifically, a <code>div</code> with a <code>class</code> of <code>main</code>.  So here&#8217;s what I had to do.
</p>

<pre>.main h1, .main h2, .main h3, .main h4, 
.main h5, .main h6, .main table {
   font: 1em Arial, "Helvetica Neue", Helvetica, sans-serif;}
.main h1 {font-size: 275%;}
.main h3:first-child {margin-top: 1em;}
.main p.tagline {margin: -0.25em 0 1.25em;
   font-size: 125%;
   color: #7B7960;}
.main h3 {margin: 1.5em 0 0.25em; font-size: 125%;}
.main h3:before {font-size: 75%; counter-increment: subhead;}
.main h4 {margin: 2.5em 0 0.75em;
   text-transform: uppercase; font-size: 125%;
   color: #928F59;}
.main p {margin: 0 0 1em;}
.main ul {padding-left: 1.5em;}
.main ul li {list-style: disc; margin: 0.5em 0;}
</pre>

<p>
This, on the other hand, is what I really <em>wanted</em> to do:
</p>

<pre>.main {
   h1, h2, h3, h4, h5, h6, table {
      font: 1em Arial, "Helvetica Neue", Helvetica, sans-serif;}
   h1 {font-size: 275%;}
   h3:first-child {margin-top: 1em;}
   p.tagline {margin: -0.25em 0 1.25em;
      font-size: 125%;
      color: #7B7960;}
   h3 {margin: 1.5em 0 0.25em; font-size: 125%;}
   h3:before {font-size: 75%; counter-increment: subhead;}
   h4 {margin: 2.5em 0 0.75em;
      text-transform: uppercase; font-size: 125%;
      color: #928F59;}
   p {margin: 1em 0;}
   ul {padding-left: 1.5em;}
   ul li {list-style: disc; margin: 0.5em 0;}
}
</pre>

<p>
Or, if necessary, to put the whole original chunk into its own style sheet and then do one of the following:
</p>

<pre>div.main {@import url(main-style.css);}

&lt;div class="main" style="@import url(main-style.css);"&gt;
</pre>

<p>
Interestingly, the latter is theoretically possible, thanks to the more advanced profiles in the CSS module &#8220;<a href="http://www.w3.org/TR/css-style-attr">Syntax of CSS rules in HTML&#8217;s &#8216;style&#8217; attribute</a>&#8220;.  I&#8217;m not aware of the former having been seriously considered (despite my best efforts, once upon a time), though it&#8217;s always possible I missed something.
</p>
<p>
But either one of those approaches would be a last resort, in my opinion.  I&#8217;d much rather just wrap the whole chunk in <code>.main { }</code>, like I showed previously, and be done with it.  That capability would also simplify certain annoyingly repetitive patterns, like the very first of those rules.  I think it&#8217;s pretty obvious which of the following is easier to write and maintain:
</p>

<pre>
body.home #content .entry h2, 
body.home #content .entry h3, 
body.home #content .entry h4, 
body.home #content .entry h5, 
body.home #content .entry h6 {...}

body.home #content .entry {
   h2, h3, h4, h5, h6 {...}
}
</pre>

<p>
I mean, just look at the former, and imagine what one goes through to write it in the first place.  Copy, paste, paste, paste, paste, paste&#8230; maddening.  And that&#8217;s just for a small block of CSS like this one.  Imagine the tedium of doing this for a block of 50 rules, or 150.  (Also, this is the the same thing that was requested in the feedback as &#8220;<a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#grouped-alternates">Grouped Alternates</a>&#8220;, albeit with a different syntax.)
</p>
<p>
One objection to this sort of pattern is that it increases dependence on descendant selectors, which are computationally inefficient.  But it doesn&#8217;t: I had to create a whole bunch of descendant selectors as it was, and did so far more clumsily.  And had I missed a command-V somewhere, I&#8217;d have had styles that applied outside their intended subtree.  Introducing a way to nest blocks like this doesn&#8217;t change anything except make it easier and more maintainable to do what we already do.  Honestly, it&#8217;s pretty much impossible to increase dependence on descendant selectors.  The best we can do now is make them less difficult to write.
</p>
<p>
I realize that the syntax I depict would cause backwards-compatibility problems, as in older browsers would not behave as intended when exposed to this sort of thing, but I&#8217;ve also stopped being concerned about that.  We can&#8217;t keep holding ourselves hostage to decisions made a decade or more back.  Provide the capability and authors will use it when they can.  Over time, its use will become more prevalent&#8212;kind of the same way authors adopted CSS in the first place.
</p>
<p>
I also realize that this case has been made time and again by many, many other people.  This isn&#8217;t even the first time I&#8217;ve made this case, though I think the other times were within the WG and therefore off the public record.  The fact that it keeps being made is a strong indicator that the need exists, and dismissing the idea because the same end effect can be achieved with existing selector syntax (as shown above) isn&#8217;t acceptable.  That&#8217;s like saying that complex selection effects can be achieved with JavaScript or XPath, so there&#8217;s no need for advanced CSS selectors.
</p>
<p>
So that&#8217;s my use case.  I actually have a bunch more, but they all follow the same basic pattern: the desire to group rules together into subsections of a document, or to otherwise simplify the writing of CSS.
</p>]]></content:encoded>
			<wfw:commentRss>http://meyerweb.com/eric/thoughts/2009/02/12/selector-blocks/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
