<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>QuirksBlog</title>
<link>http://www.quirksmode.org/blog/</link>
<description></description>
<copyright>Copyright 2010</copyright>
<lastBuildDate>Mon, 22 Mar 2010 14:38:20 +0100</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.14</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>CSS vendor prefixes considered harmful</title>
<description><![CDATA[<p>I recently came across <a href="http://blogs.msdn.com/ie/archive/2010/03/19/the-css-corner-about-css-corners.aspx"
class="external">a post about border-radius</a> by the IE team, that said IE9 supports
<code>border-radius</code> (cool!) without vendor prefix (even cooler!)</p>

<p>The post continues:</p>

<blockquote>
<p>While a number of web pages already make use of this feature, some [...] do not render properly in IE9 or Opera 10.50 because <em>they lack an unprefixed declaration of the border-radius property</em>.</p>
<p>As the specification nears Recommendation and browser vendors are working on their final implementations and testcases for submission to the W3C, we recommend that new content always include a border-radius declaration without vendor prefix.</p>
</blockquote>

<p>I&#8217;d like to go one step further.</p>

<p class="accent">It&#8217;s time to abolish all vendor
prefixes. They&#8217;ve become solutions for which there is no
problem, and they are actively harming web standards.</p>

<p>Vendor prefixes force web developers to make their style sheets
much more verbose than is necessary, while also running the risk of accidentally forgetting
one set of vendor-prefixed declarations.</p>

<p>Besides, why do we need to use several declarations for obtaining one single effect? Weren&#8217;t
web standards supposed to prevent that sort of thing?</p>

<p>Guys, let&#8217;s stop the vendor prefix nonsense. Enough&#8217;s enough.</p>

<h3>The point</h3>

<p>Originally, the point of vendor prefixes was to allow browser makers to start supporting
experimental CSS declarations.</p>

<p>Let&#8217;s say a W3C working group is discussing a
<code>grid</code> declaration (which, incidentally, wouldn&#8217;t be such a bad idea).
Let&#8217;s furthermore say that some people create a draft specification, but others
disagree with some of the details. As we know, this process may take ages.</p>

<p>Let&#8217;s furthermore say that Microsoft as an experiment decides to implement
the proposed <code>grid</code>.
At this point in time, Microsoft cannot be certain that the specification will not change.
Therefore, instead of adding <code>grid</code> to its CSS, it adds <code>-ms-grid</code>.</p>

<p>The vendor prefix kind of says &#8220;this is the Microsoft interpretation of an ongoing
proposal.&#8221; Thus, if the final definition of <code>grid</code> is different, Microsoft can
add a new CSS property <code>grid</code> without breaking pages that depend on <code>-ms-grid</code></p>

<p>Now in itself this is a reasonable line of thought. Point is, it&#8217;s outlived its
usefulness. It&#8217;s just not necessary any more, neither from a practical nor from
a more philosophical point of view.</p>

<h3>Practical problems</h3>

<p>Let&#8217;s take a look at some practical cases.</p>

<h4>box-sizing</h4>

<p>One place where vendor prefixes have always annoyed me terribly is the <a href="/css/box.html">box-sizing
property</a> that allows you to switch from one box model to another. Currently IE8
and Opera support <code>box-sizing</code> without prefix, but Firefox supports only
<code>-moz-box-sizing</code> and Safari, Chrome, and all mobile WebKits only
<code>-webkit-box-sizing</code>.</p>

<p>In other words, this is the code to switch the box model of one div.</p>

<pre>
div.borderbox {
	box-sizing: border-box;		/* one */
	-moz-box-sizing: border-box;	/* two */
	-webkit-box-sizing: border-box;	/* three */
}
</pre>

<p>The fact that I have to use three declarations for obtaining one effect is
completely preposterous. We might as well live in the Browser Wars era. Standards,
anyone?</p>

<p>The point here is <em>that <code>box-sizing</code> will not change any more</em>. Its
purpose is to switch box models, and its two values <code>border-box</code> and
<code>content-box</code> are supported everywhere.</p>

<p>This declaration <em>makes sense</em> as it is, and
it is <em>supported by all browsers</em> as it is. So it should have the same name
in every browser.</p>

<p>Why wait for W3C
to put its stamp of approval on it before removing the prefixes? We all know
that&#8217;s going to take another five to ten years.</p>

<p>Mozilla, WebKit, you&#8217;re just being thoughtlessly conservative here. Get
rid of your vendor prefixes.</p>

<h4>Transitions</h4>

<p>Consider the transitions Safari added. They&#8217;re all
prefixed with <code>-webkit-</code>. Here, too, the point is that the Safari team has
effectively specified all these declarations. <em>They&#8217;re not going to change any more</em>.</p>

<p>Google and Opera are implementing transitions, too. I studied the
<a href="http://developer.apple.com/safari/library/documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Transitions/Transitions.html"
class="external">Apple</a> and
<a href="http://www.opera.com/docs/specs/presto25/css/transitions/"
class="external">Opera</a> documentations a bit, and they look quite alike. In fact,
right now I dare state that Opera is working to copy Apple&#8217;s transitions system.</p>

<p>But Apple uses <code>-webkit-transition</code>, while Opera is using
<code>-o-transition</code>.</p>

<p>Guys ...</p>

<pre>
div.coolEffect {
  -webkit-transition-property: opacity;	/* one */
  -webkit-transition-duration: 2s;
  -o-transition-property: opacity;		/* two */
  -o-transition-duration: 2s;
  -moz-transition-property: opacity;  		/* three */
  -moz-transition-duration: 2s;
  -ms-transition-property: opacity;		/* four */
  -ms-transition-duration: 2s;
}
</pre>

<p>I don&#8217;t want to use <em>four</em> browser-specific
declarations to obtain <em>one</em> effect!
This sort of vendor-specific nonsense is exactly what web standards were
supposed to do away with. No more
bloody fragmentation!</p>

<p>What if a web developer accidentally forgets one vendor prefix? Then the effect
won&#8217;t work while it could &#8212; something we&#8217;ve learned to recognise
as a grave sin. Still, it&#8217;s bound to happen in a standardless world.</p>

<p>Enough&#8217;s enough. Vendor prefixes have to go.</p>

<h4>A peek into the future</h4>

<p>The most idiotic example comes from the mobile world. Opera has implemented a touchscreen
media query in the Vodafone widget manager, and called it <code>-o-touchscreen</code>.</p>

<p>When Samsung started to work on its WebKit-based widget manager, it was notified of the
existence of this media query and promptly copied it. To the letter.</p>

<p>Thus, we now have a <em>WebKit</em>
browser reacting to <code><strong>-o-</strong>touchscreen</code>.</p>

<p>And this is just the beginning. It&#8217;s going to get much, much worse.</p>

<p>Eventually Opera will discover that plenty of sites use <code>-webkit-transition</code>,
but not <code>-o-transition</code>. Will Opera start to support <code>-webkit-transition</code>,
too?</p>

<p>From a compatibility perspective that might make sense.
From any other perspective it&#8217;s totally ridiculous, though.
And there&#8217;s a simple solution to this problem:
<code>transition</code> has become a de-facto web standard.
So treat it as one.</p>

<p>Let&#8217;s stop the vendor prefix nonsense. Now.</p>

<h3>Philosophical problems</h3>

<p>So from a practical perspective vendor prefixes are turning into a tool for
fragmentation. From a philosophical perspective, moreover, they solve problems that
just aren&#8217;t there any more.</p>

<p>As far as I can see vendor prefixes were supposed to solve two problems:</p>

<ol>
	<li>The problem with unfinished standards I outlined earlier.</li>
	<li>The problem underlying that problem: an automatic assumption that, when
	left to their own devices, browser vendors would all start to implement their
	own stuff without paying attention to what the other browsers were doing.</li>
</ol>

<p>Both problems have meanwhile been solved, as far as I can see.</p>

<p>We&#8217;re currently moving toward a situation in which anything that is implemented
by two browsers more-or-less automatically becomes a standard. I don&#8217;t think that
this change of process has been accepted by W3C yet (it might take another generation),
but it&#8217;s becoming reality as we speak.</p>

<p>The reason this system can work is <em>because browser vendors now want to copy
each other&#8217;s implementations!</em> Microsoft, Mozilla, Apple, Google, and Opera
are all eyeing each other&#8217;s browsers and want to resemble each other in standards
support, while competing in execution excellence, interface smoothness, and standards extension.</p>

<p>Contrary to the Browser Wars era when vendor prefixes were defined, right now
browser vendors are <em>genuinely</em> interested in interoperability. There is no
danger any of them will go off on a wild tangent and, I don&#8217;t know, redefine <code>box-sizing: border-box</code>
to mean &#8220;anything inside the border.&#8221; That sort of thing
just doesn&#8217;t make sense any more today.</p>

<p>The Safari team invented cool, new transition stuff. They made it CSS-based,
documented it, and <a href="http://www.w3.org/TR/css3-transitions/" class="external">submitted
it to W3C</a>. That&#8217;s all good.</p>

<p>Then they added the <code>-webkit-</code> prefix. That&#8217;s bad.</p>

<p>Now Opera comes along, and wants to support transitions, too.
Is Opera going to invent its own system? Is Opera suddenly going to
give <code>transition</code> a completely different meaning that is totally incompatible
with Safari&#8217;s?</p>

<p>Of course not! The Opera guys aren&#8217;t crazy. They know their bread is
buttered on the compatibility side of things. The same goes for all other browser
vendors.</p>

<p>But they do add their own vendor prefix. That&#8217;s ridiculous. And pointless.</p>

<p><code>transition</code> and all the rest have become de-facto standards. Any browser implementing
the transition system will make sure that it is compatible with Safari. So who needs
vendor prefixes?</p>

<p>Dear browser vendors, take a little more pride in your willingness to work with
your competitors towards web standards, even when you invent new functionality. You
do not need vendor prefixes any more. You&#8217;ve grown beyond them.</p>

<p>The time has come to abolish all vendor prefixes. They&#8217;ve become fossils of a bygone
era, but with the potential to harm web standards significantly.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/03/css_vendor_pref.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/03/css_vendor_pref.html</guid>
<category>Browsers</category>
<pubDate>Mon, 22 Mar 2010 14:38:20 +0100</pubDate>
</item>
<item>
<title>The payment argument is nonsense</title>
<description><![CDATA[<p>In response to my <a href="/blog/archives/2010/03/html5_apps.html">HTML5 apps</a> argument a few people came back to how the payment thingy is missing from my idea, and how it will (apparently) be worthless because of that. I&#8217;ve been thinking about that a lot in the past few days, and I&#8217;m increasingly of the opinion that the payment argument is nonsense.</p>

<p>Sure, everybody who does iPhone apps, or who&#8217;s glancing cursorily at the mobile market without trying to gain in-depth knowledge, currently believes that the App Store concept is going to be a huge success because of the opportunity for developers to earn some money. But they&#8217;re just wrong.</p>

<p>I did some back-of-napkin calculations and found that, macro-economically speaking, iPhone app development costs money right now. And yes, an individual developer can strike it rich, but that&#8217;s getting rarer and rarer. I do not want to build a new app ecosystem based on arguments from developers who just want to take a gamble in the App Store roulette. Gamblers&#8217; arguments are not real arguments.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/03/the_payment_arg.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/03/the_payment_arg.html</guid>
<category>Mobile</category>
<pubDate>Thu, 11 Mar 2010 15:35:02 +0100</pubDate>
</item>
<item>
<title>HTML5 apps</title>
<description><![CDATA[<p>Right now nobody&#8217;s interested in a mobile solution that does not contain the words &#8220;iPhone&#8221; and &#8220;app&#8221; and that is not submitted to a closed environment where it competes with approximately 2,437 similar mobile solutions.</p>

<p>Compared to the current crop of mobile clients and developers, lemmings marching off a cliff follow a solid, sensible strategy. Startling them out of this <a href="/blog/archives/2010/02/the_iphone_obse.html">obsession</a> requires nothing short of a new buzzword.</p>

<p>Therefore I&#8217;d like to re-brand standards-based mobile websites and applications, definitely including W3C Widgets, as &#8220;HTML5 apps.&#8221; People outside our little technical circle are already aware of the existence of HTML5, and I don&#8217;t think it needs much of an effort to
elevate it to full buzzwordiness.</p>

<p>Technically, HTML5 apps would encompass all websites as well as all the myriads of (usually locally installed) web-standards-based application systems on mobile. The guiding principle would be to write and maintain one single core application that uses web standards, as well as a mechanism that deploys that core application across a wide range of platforms.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/03/html5_apps.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/03/html5_apps.html</guid>
<category>Mobile</category>
<pubDate>Mon, 08 Mar 2010 15:45:15 +0100</pubDate>
</item>
<item>
<title>Fronteers 2010</title>
<description><![CDATA[<p><a href="http://fronteers.nl/congres/2010" class="external">Fronteers 2010</a> has been announced: 7 and 8 October, Amsterdam. <a href="http://adactio.com/" class="external">Jeremy Keith</a> and <a href="http://jeffcroft.com/" class="external">Jeff Croft</a> have been announced as speakers. Ticket sale will start in April at the latest.</p>

<p>For clarity's sake: this year I have nothing to do with the organisation; I'll just attend the conference, relax, enjoy the show, as well as a beer or two.</p>

<p>Maybe I'll meet some of my readers at Fronteers 2010.</p>]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/03/fronteers_2010.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/03/fronteers_2010.html</guid>
<category>Conferences</category>
<pubDate>Fri, 05 Mar 2010 17:13:54 +0100</pubDate>
</item>
<item>
<title>Political blog split off QuirksBlog trunk</title>
<description><![CDATA[<p>I have decided to follow Dutch politics a bit more openly and to blog about it. Still, I
don&#8217;t want to force this content on people that are just interested in web development.
According to my own calculations the number of non-Dutch readers that are interested in
Dutch politics is about twelve, so for those twelve, as well as the more sizable group of
Dutch followers interested in politics, I&#8217;ve now created a <a href="/politics">politics
homepage</a> and <a href="/politics/blog">blog</a>.</p>

<p>Swept away by the literally two requests from non-Dutch readers, I&#8217;ve also decided to
publish my political primer, which will ideally consist of eleven long background articles, of
which only the first eight are written. I will publish one article every Wednesday until I
run out of material.</p>

<p>Here on the main QuirksBlog I may write some stuff about the JavaScript graph functions I
created for the primer
(<a href="/politics/parliaments.html">parliament graphs</a>,
<a href="/politics/table.html">tables</a>). Unfortunately, right now any JavaScript-focused article would mainly
consist of a long list of features I haven&#8217;t implemented yet. Most of the graphs aren&#8217;t
really keyboard-accessible, for instance, because I&#8217;m not happy with the idea of adding
dozens of useless <code>&lt;a&gt;</code> elements just to make parts of the graphs keyboard-focusable.</p>

<p>All in all I&#8217;m hurrying to catch up with events. I hadn&#8217;t planned to publish any
of this, but the government crisis has forced my hands. Please excuse the occasional wart or bug.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/political_blog.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/political_blog.html</guid>
<category>Politics</category>
<pubDate>Mon, 22 Feb 2010 16:11:55 +0100</pubDate>
</item>
<item>
<title>Dutch government falls over Afghanistan</title>
<description><![CDATA[<p>As long-time visitors know I occasionally talk about Dutch politics here for the benefit
of my Dutch readers as well as those twelve foreign readers that are interested in these matters.
Since Dutch government fell late yesterday night, it&#8217;s time for another such post.</p>

<p>The Balkenende IV government (i.e. the fourth government that Balkenende (CDA) was prime
minister of) was formed three years ago and consists of centre-right
CDA (christian-democrats), centre-left PvdA (Labour), and orthodox-protestant left-leaning
CU (Union of Christians). Yesterday evening the PvdA ministers resigned over a conflict
about the continuing Dutch military presence in the Afghan province of Uruzgan.</p>

<p>In a week and a half local elections will be held,
and the PvdA was slated to lose a lot of seats everywhere. PvdA party leader and finance
minister Bos clearly hopes to stem the electoral tide by his resignation, and he might well
be right.</p>


<p><strong>Update</strong>: This will be the last political entry on the main QuirksBlog. I now have a separate <a href="/politics">politics section</a> with a blog as well as an article series about Dutch political history.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/dutch_governmen.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/dutch_governmen.html</guid>
<category>Politics</category>
<pubDate>Sat, 20 Feb 2010 17:20:52 +0100</pubDate>
</item>
<item>
<title>Browser news from the Mobile World Congress</title>
<description><![CDATA[<p>Yesterday evening I returned from my fourth foreign trip this year. This time I went to
the <a href="http://www.mobileworldcongress.com/" class="external">Mobile World Congress</a>,
the annual Barcelona-based get-together of the mobile industry, and I can tell you, it&#8217;s
<em>something else</em>.</p>

<p>This post gives an overview of announcements by mobile players that might be of interest
to web developers. There&#8217;s an incredible lot of it, too, because every single major mobile
player except Apple feels that MWC is the ultimate forum for major announcements.</p>

<p>If you know of more news, or have links to additional information, please leave a comment.</p>

<p>I was there because Vodafone had invited me to sit on a
<a href="http://mobilewidgetdev.wordpress.com/2010/02/05/its-not-easy-developing-for-mobile-an-expert-panel-discussion-at-mwc/"
class="external">panel</a> in a technical &#8220;embedded
conference&#8221; about W3C Widgets and related technologies.
The concept can use some fine-tuning; I&#8217;m hoping to do some of that in the future.
I was there mainly to stress that the mobile browser situation is not as simple as it looks. THERE
IS NO WEBKIT ON MOBILE! <br>
While I was at it I also invented guerilla browser testing.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/browser_news_fr_1.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/browser_news_fr_1.html</guid>
<category>Mobile</category>
<pubDate>Thu, 18 Feb 2010 18:24:59 +0100</pubDate>
</item>
<item>
<title>The iPhone obsession</title>
<description><![CDATA[<p>Since my attempts at capturing web developers&#8217; hearts and minds by
<a href="/blog/archives/2010/02/persistent_touc.html">publishing</a>
<a href="/blog/archives/2010/02/the_touch_actio.html">fundamental</a>
<a href="/blog/archives/2010/02/do_we_need_touc.html">research</a>
have failed miserably but my thirst for attention continues unabated,
today I will once more shout at iPhone developers. That&#8217;s
<a href="/blog/archives/2009/11/apple_is_not_ev.html">proven to work</a>.</p>

<p>More specifically, today I will shout at web developers who think that delicately inserting an
iPhone up their ass is the same as mobile web development.</p>

<p>Before we start, a little thought experiment. Suppose I proposed the following:</p>

<ol>
	<li>IE6 is today&#8217;s most advanced browser. (<strong>Note</strong>: this was actually
	true back in 2000. Please bear with me.)</li>
	<li>IE6&#8217;s market share is about 80%.</li>
	<li>The other browsers are way worse than IE6, and developing for them is a pain;
	something we&#8217;re not interested in and are a bit afraid of.</li>
	<li>Therefore we will develop websites exclusively for IE6.</li>
</ol>

<p>Would you agree with those sentiments, even if we&#8217;re back in 2000 and IE6 is <em>really</em>
the best browser we have?</p>

<p>Or would you reply that our sites should work as well as they can in all browsers
through the use of web standards, progressive enhancement, and all the rest
of the best practices we&#8217;ve been preaching for the past ten years?</p>

<p>I distinctly remember a time when we web developers cared about such concepts.
But those times are long gone.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html</guid>
<category>Mobile</category>
<pubDate>Mon, 08 Feb 2010 13:13:20 +0100</pubDate>
</item>
<item>
<title>Do we need touch events?</title>
<description><![CDATA[<p>One reaction I received about my <a href="/blog/archives/2010/02/the_touch_actio.html"
	>touch research</a> was: Do we really need
the touch events? Can&#8217;t we just fire the mouse events when a touch action occurs? After all,
touch and mouse events aren&#8217;t <em>that</em> different.</p>

<p>That&#8217;s a fair question. It deserves a fair answer.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/do_we_need_touc.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/do_we_need_touc.html</guid>
<category>Mobile</category>
<pubDate>Fri, 05 Feb 2010 14:19:46 +0100</pubDate>
</item>
<item>
<title>Persistent touch event objects</title>
<description><![CDATA[<p>It turns out to be possible to handle the touchmove and touchend events with data obtained
from the touchstart event object. It is not necessary to access the touchmove and touchend event
objects, as long as you continue to have access to the touchstart one.</p>

<p>Apparently, the touchstart event object persists in browser memory even when the event has long
ended. More importantly, it continues to be updated with information about the current touch action.</p>

<p>This is interesting. It&#8217;s also profoundly different from the desktop, where a similar
trick with the mousedown, mousemove, and mouseup events definitely does <em>not</em> work.</p>

<p>Both iPhone and Android display this behaviour. Therefore future implementations of the
touch events should, too.</p>
]]></description>
<link>http://www.quirksmode.org/blog/archives/2010/02/persistent_touc.html</link>
<guid>http://www.quirksmode.org/blog/archives/2010/02/persistent_touc.html</guid>
<category>Mobile</category>
<pubDate>Wed, 03 Feb 2010 22:58:32 +0100</pubDate>
</item>


</channel>
</rss>