<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>destroy/dstorey</title><generator>Tumblr (3.0; @dstorey)</generator><link>http://generatedcontent.org/</link><item><title>Responsive viewport units</title><description>&lt;p&gt;With all this new fangled talk of &lt;a href="http://en.wikipedia.org/wiki/Responsive_Web_Design" target="_blank"&gt;responsive web design&lt;/a&gt;, its about time that we had a poster child CSS unit to go with it. So move over &lt;code&gt;em&lt;/code&gt;, CSS3 Values and Units introduces a bunch of new &lt;a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" target="_blank"&gt;viewport units&lt;/a&gt; that are getting ready for their time in the limelight.&lt;/p&gt;

&lt;p&gt;Motorola recently implemented support for these viewport length units and they’ve now found their way into Chrome Canary, so we can now start to experiment with them. They are also supported in IE9, although the &lt;code&gt;vm&lt;/code&gt; unit has been updated to &lt;code&gt;vmin&lt;/code&gt; since then.&lt;/p&gt;

&lt;h4&gt;Introducing vh, vw, and vmin&lt;/h4&gt;

&lt;p&gt;The &lt;a href="http://www.w3.org/TR/css3-values/#vh-unit" target="_blank"&gt;&lt;code&gt;vh&lt;/code&gt; unit&lt;/a&gt; stands for viewport height, &lt;a href="http://www.w3.org/TR/css3-values/#vw-unit" target="_blank"&gt;&lt;code&gt;vw&lt;/code&gt;&lt;/a&gt; for &lt;del&gt;Volkswagen&lt;/del&gt; viewport width, and &lt;a href="http://www.w3.org/TR/css3-values/#vmin-unit" target="_blank"&gt;&lt;code&gt;vmin&lt;/code&gt;&lt;/a&gt; represents whichever of &lt;code&gt;vh&lt;/code&gt; or &lt;code&gt;vw&lt;/code&gt; is the shortest length.&lt;/p&gt;

&lt;p&gt;The values used can be somewhat confusing if you’ve not used these units before, as &lt;code&gt;1vh&lt;/code&gt; represents 1% of the current viewport (the content area of the browser window) height, rather than 100% as you may expect. Therefore if you want an element to be the full height of your viewport you should set it to &lt;code&gt;100vh&lt;/code&gt;. As you would expect, &lt;code&gt;vw&lt;/code&gt; works exactly the same way as &lt;code&gt;vh&lt;/code&gt; units.&lt;/p&gt;

&lt;p&gt;If you have a widescreen monitor and your browser window is set to full screen, the width would be wider than the height. In this case the &lt;code&gt;vmin&lt;/code&gt; unit would be the same as the &lt;code&gt;vh&lt;/code&gt; unit.&lt;/p&gt;

&lt;p&gt;The viewport units are dynamic rather than static, so if you resize the browser window, the computed value of the units will also change. If for example your browser window is 1000px wide, and element with a width of &lt;code&gt;10vw&lt;/code&gt; would be 100px wide. If you shrink the browser window to only 100px wide, the width of the element would resize with it to 10px wide.&lt;/p&gt;

&lt;h4&gt;A responsive example&lt;/h4&gt;

&lt;p&gt;One of the big issues with using multi-column layout is that you need to endlessly scroll up and down the page to read each column if the height is taller than the viewport. The viewport units mitigate this somewhat, as you can set the hight of the element with multi-column applied to it to be smaller than the viewport height (but remember to take the margins into account). You still have the issue of horizontal scrolling if you restrict the height, but this may be an ok solution if you&amp;#8217;re designing for something like a tablet device.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve created a quick example that uses this technique. Go and check out my &lt;a href="http://dl.dropbox.com/u/444684/text/multi-column-viewport.html" target="_blank"&gt;multi-column responsive viewport example&lt;/a&gt; in Chrome Canary to see it in action. It should look something like the following screenshot:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m2n1gaECpj1qmllqg.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;As the scrollbar is hidden by default in Mac OS X Lion, its a bit difficult in this example to see that the text is scrollable horizontally.&lt;/p&gt;

&lt;p&gt;Setting the width and height to respond to the viewport size is trivial with the &lt;code&gt;vh&lt;/code&gt; and &lt;code&gt;vw&lt;/code&gt; units:&lt;/p&gt;

&lt;pre&gt;article &amp;gt; section {
    column-width: 22rem;
    column-gap: 2.6rem;
                
    height: 80vh;
    width: 80vw;
        
    overflow: scroll;
}

&lt;/pre&gt;

&lt;p&gt;This sets the height to be 80% of the viewport height, and the width to be 80% of the viewport width.  The width of each column is set to be ideally 22rem (220px in this case) wide, but the browser can adjust this as needed. Finally &lt;code&gt;overflow&lt;/code&gt; is set to &lt;code&gt;scroll&lt;/code&gt; so that additional columns are hidden and can be scrolled into view, rather than overflowing to the right, and potentially overlapping any element that we place there.&lt;/p&gt;

&lt;p&gt;I also set some margins on the body element to give some breathing space. This also scale with the viewport size, to be 2% of the viewport height top and bottom, and 10% of the width left and right:&lt;/p&gt;

&lt;pre&gt;body {
    margin: 2vh 10vw;
}

&lt;/pre&gt;

&lt;p&gt;With this, you have a truly responsive design (at least with a simple example such as this), without even touching media queries. Imagine what untold powers they will bestow on you when you combine them? Add Flexbox to the mix, and we’ll really be cooking on gas.&lt;/p&gt;</description><link>http://generatedcontent.org/post/21279324555</link><guid>http://generatedcontent.org/post/21279324555</guid><pubDate>Tue, 17 Apr 2012 12:36:55 -0700</pubDate><category>responsive</category><category>viewport</category><category>multi-column</category></item><item><title>What’s new in CSS3 Values and Units?</title><description>&lt;p&gt;In CSS3 the values and units we can use in CSS properties are defined in the appropriately named &lt;a href="http://dev.w3.org/csswg/css3-values/" target="_blank"&gt;CSS Values and Units&lt;/a&gt; specification, with the exception those relating to colour and images, and the pre-defined keywords specific to individual properties.&lt;/p&gt;

&lt;p&gt;This spec gives us one new CSS wide keyword to play with (the &lt;code&gt;initial&lt;/code&gt; keyword), five new relative units for lengths, five new functional notations, and various new types and units to support new CSS3 modules such as Grid and Flexbox layout, Transitions, and Transforms.&lt;/p&gt;

&lt;h4&gt;CSS-wide initial keyword&lt;/h4&gt;

&lt;p&gt;CSS2.1 added the first CSS-wide keyword to every property with the &lt;code&gt;inherit&lt;/code&gt; keyword. CSS3 adds to this with the &lt;code&gt;initial&lt;/code&gt; keyword. When you set a property’s value to &lt;code&gt;initial&lt;/code&gt; it will set the value to what is defined as the initial value in the CSS specification for that property. Note that this is sometimes, but not always the same as the default value set in the user-agent style sheet. For example the initial value for various margin and padding properties is 0, but the default value given by the user-agent depends on the element to which it applies.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;initial&lt;/code&gt; keyword can be useful if an element is inheriting unwanted styles and the original styling is desired. It is probably not something you will need to use often, but it is a useful tool to have on occasions. This is currently only supported by WebKit and Firefox (with moz prefix: &lt;code&gt;-moz-intitial&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Take a look at the &lt;a href="http://dl.dropbox.com/u/444684/initial.html" target="_blank"&gt;&lt;code&gt;initial&lt;/code&gt; keyword demo&lt;/a&gt; I prepared to see this in action. This currently requires a Gecko or WebKit browser at the time of writing.&lt;/p&gt;

&lt;h4&gt;Font relative length units&lt;/h4&gt;

&lt;h5&gt;The rem unit&lt;/h5&gt;

&lt;p&gt;The &lt;code&gt;rem&lt;/code&gt; unit is perhaps my favourite new part of CSS3 Values. It stands for root em, and if you already understand how &lt;code&gt;em&lt;/code&gt;s work (I assume that is most of you?) then you’ll be right at home. They are only subtly different, but it makes them easier to work with.&lt;/p&gt;

&lt;p&gt;The root part of the name refers to the root element, or the &lt;code&gt;html&lt;/code&gt; element in HTML and the initial &lt;code&gt;svg&lt;/code&gt; element in SVG. With regular &lt;code&gt;em&lt;/code&gt;s the size of &lt;code&gt;1em&lt;/code&gt; is set to value of the &lt;code&gt;font-size&lt;/code&gt; property of the current element, or the size of the parent element’s text size when used with the &lt;code&gt;font-size&lt;/code&gt; property itself. The font size varies from element to element, so the size of an &lt;code&gt;em&lt;/code&gt; is not consistent across the document. This requires a lot of calculation when you are tying to line elements up or are tying to &lt;a href="http://24ways.org/2006/compose-to-a-vertical-rhythm" target="_blank"&gt;compose text to a vertical rhythm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;rem&lt;/code&gt; value however stays consistent across the document, as &lt;code&gt;1rem&lt;/code&gt; is always the same size as the &lt;code&gt;font-size&lt;/code&gt; of the &lt;code&gt;html&lt;/code&gt; element (or root of which ever language you are using). If you want a margin to be a certain length, you just need to calculate it once for any element. If you want to make the maths as easy as possible you can set the html element to have a &lt;code&gt;font-size&lt;/code&gt; of &lt;code&gt;10px&lt;/code&gt; (or another multiple of 10), then set the desired body copy size on the &lt;code&gt;body&lt;/code&gt; element, such as &lt;code&gt;font-size: 1.2rem&lt;/code&gt; for 12px. Now you get the scalability benefits of &lt;code&gt;em&lt;/code&gt;s along with the ease of use and predictability of &lt;code&gt;px&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;The only downside is the browser support.  Its supported in IE9, Firefox 3.6+, Safari 5+ and Chrome. It is also coming to Opera 12, which should hopefully be released soon. As Opera users generally upgrade fast, and Firefox &amp;lt;3.6 is only around 1% market share, your only real issue in the near feature will be those users stuck on IE6–8. Using a fallback is easy if you set the root font size to 10px, as you can set every size you set in rems to the equivalent px size. For example 2rem is 20px, 1.7rem is 17px, and so on. It adds a lot more page weight however.&lt;/p&gt;

&lt;p&gt;I’ve prepared a &lt;a href="http://dl.dropbox.com/u/444684/rem-example.html" target="_blank"&gt;rem unit demo&lt;/a&gt; which shows how you can follow a vertical rhythm using this unit.&lt;/p&gt;

&lt;h5&gt;The ch unit&lt;/h5&gt;

&lt;p&gt;The &lt;code&gt;ch&lt;/code&gt; unit is equal to the width of the &lt;q&gt;0&lt;/q&gt; (zero) glyph in the font used by the current element. This is mostly useful when using monospace fonts, where all glyphs are the same width. For example, if you have a &lt;code&gt;pre&lt;/code&gt; element where you want it to wrap after a 55 of characters, you can use &lt;code&gt;width: 55ch;&lt;/code&gt; unit.&lt;/p&gt;

&lt;p&gt;This unit is currently only supported by Internet Explorer 9 and Firefox.&lt;/p&gt;

&lt;h4&gt;Viewport relative lengths&lt;/h4&gt;

&lt;p&gt;There are three viewport relative lengths: &lt;code&gt;vh&lt;/code&gt;, &lt;code&gt;vw&lt;/code&gt;, and &lt;code&gt;vm&lt;/code&gt;. These are relative to the size of the initial containing block, or in other words the viewport. If you resize the viewport, such as changing the size of the browser window, then the size of elements specified in these units will change.&lt;/p&gt;

&lt;h5&gt;The vw unit&lt;/h5&gt;

&lt;p&gt;This is relative to the width of the viewport. One &lt;code&gt;vw&lt;/code&gt; unit is 100&lt;sup&gt;th&lt;/sup&gt; of the width of the viewport. If the viewport is 1000 pixels wide then &lt;code&gt;10vw&lt;/code&gt; would map to 100px.&lt;/p&gt;

&lt;h5&gt;The vh unit&lt;/h5&gt;

&lt;p&gt;The &lt;code&gt;vh&lt;/code&gt; unit works the same way as &lt;code&gt;vw&lt;/code&gt;, but is relative to the height of the viewport instead.&lt;/p&gt;

&lt;h5&gt;The vm unit&lt;/h5&gt;

&lt;p&gt;The &lt;code&gt; vm&lt;/code&gt; unit maps to whichever of the viewport width or hight is the smallest. There is some talk of dropping this as the same can be achieved using the &lt;code&gt;min()&lt;/code&gt; functional notation.&lt;/p&gt;

&lt;p&gt;These new units can be very useful if you don&amp;#8217;t want something to end up larger than the viewport. One use case I’ve had for these is while using multi-column layout. You often don&amp;#8217;t want text using multi-column to be taller than the screen size as the user will have to scroll up and down for each column. With &lt;code&gt;vh&lt;/code&gt; you could use for example &lt;code&gt;height: 95vh&lt;/code&gt; which would make it 95% of the height of the viewport, no matter how tall the viewport is. You could also imagine them being useful for things like slide shows, video players, and mobile.&lt;/p&gt;

&lt;p&gt;You might think these units sound great, but unfortunately they currently only work in IE9 and above, so it will be some time before we can used them.&lt;/p&gt;

&lt;h4&gt;The rest&lt;/h4&gt;

&lt;p&gt;There are new units for angles (&lt;code&gt;deg&lt;/code&gt;, &lt;code&gt;grad&lt;/code&gt;, &lt;code&gt;rad&lt;/code&gt;, and &lt;code&gt;turn&lt;/code&gt; units) and times (&lt;code&gt;s&lt;/code&gt;, &lt;code&gt;ms&lt;/code&gt; units. These are used in CSS3&amp;#160;2D/3D Transforms, and CSS Transitions respectively. There are also new units for frequencies (&lt;code&gt;Hz&lt;/code&gt;, &lt;code&gt;kHz&lt;/code&gt; units). These are used in the CSS3 Speech module.&lt;/p&gt;

&lt;p&gt;There are new layout specific units: fractions using the &lt;code&gt;fr&lt;/code&gt; unit, and grid units using the &lt;code&gt;gr&lt;/code&gt; unit.&lt;/p&gt;

&lt;p&gt;It doesn’t make too much sense covering these, without coving the full spec for which they are used, so I will leave them for a later date. There are also five functional notations, which require in-depth explanation, so they deserve their own post. I will cover these in the near future. These are mathematical expressions (&lt;code&gt;calc()&lt;/code&gt;, &lt;code&gt;min()&lt;/code&gt; and &lt;code&gt;max()&lt;/code&gt;), cycling values (&lt;code&gt;cycle()&lt;/code&gt;), and attribute references (&lt;code&gt;attr()&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;I hope you find some useful ways to use these new values and units that we now have to play with.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11933972962</link><guid>http://generatedcontent.org/post/11933972962</guid><pubDate>Tue, 25 Oct 2011 19:09:46 -0700</pubDate><category>css3</category><category>values and units</category><category>typography</category><category>calc</category></item><item><title>What’s new in Android 4.0 for Web Developers?</title><description>&lt;p&gt;&lt;img src="http://www.google.com/nexus/img/content/introduction.png"/&gt;&lt;/p&gt;

&lt;p&gt;Google recently announced the &lt;a href="http://developer.android.com/sdk/android-4.0.html" target="_blank"&gt;Ice Cream Sandwich&lt;/a&gt; version of Android, along with a new version of the WebKit-based browser. Lets have a look at what is in there that’s of interest for web developers.&lt;/p&gt;

&lt;h4&gt;User agent switching, or a knock to the mobile specific site?&lt;/h4&gt;

&lt;p&gt;When I was working with web site compatibility at Opera, one of the biggest complaints we got time and time again was when a popular site switched to giving the mobile version of the site rather than the desktop version. Despite perceived wisdom from developers that users are in the mobile context and want mobile optimised sites, the reality is users screamed blue murder. Especially when the site gave no option to switch back. The reasons were usually two fold. One: many users knew their way around the site and where they had to go (even when they only accessed the web on a mobile device) and two: often they wanted to use a feature that the developers had decided the mobile version didn&amp;#8217;t need. Many of these users couldn&amp;#8217;t just wait until they were on a desktop PC to use those features as their only way to access the web was through a mobile (think rural China, India or the Philippines for example).&lt;/p&gt;

&lt;p&gt;One perfect example was GMail. If you tried to sign up for an account (no one does that on mobile right?) it would say something like &lt;q&gt;sign up for an account on a PC&lt;/q&gt;. These users were completely locked out of the site with no way to get an account.&lt;/p&gt;

&lt;p&gt;I suspect Google has been getting the same complaints Opera was getting, especially as Android is starting to become popular in developing countries. For the Android 4 browser, they have added a way to switch to the desktop site on a per tab basis:&lt;/p&gt;

&lt;blockquote&gt;
To get the most out of web content, users can now request full desktop versions of web sites, rather than their mobile versions. Users can set their preference for web sites separately for each browser tab.
&lt;/blockquote&gt;

&lt;p&gt;If I&amp;#8217;d hazard a guess about how they do this, then it would be that they switch the user agent string to that of a desktop browser such as Chrome. That way the site developer will think it is a desktop browser and will give the desktop site. If they cloak well enough, there will be no way for the developer to force users into using the mobile site. I think this is a good thing, as it will open up choice to the user, and force developers to think about making their regular sites as friendly as possible. This is exactly what &lt;a href="http://www.netmagazine.com/features/mobile-first" target="_blank"&gt;the mobile first&lt;/a&gt; brigade have been preaching. I suspect things like Media Queries will still work as expected in desktop mode. It will certainly put a dent in the firearms of those that want to browser sniff to give (or try to give. It always goes wrong. I’ve lost count of the amount of issues I had to deal with related to sever side browser sniffing for mobile browsers going wrong, across almost every major site) a tailored experience to mobile devices.&lt;/p&gt;

&lt;p&gt;So to recap, to guarantee a good experience on Android, you will need to make sure both your mobile site and your desktop site is mobile friendly. Or use one site and adapt via things like media queries.&lt;/p&gt;

&lt;h4&gt;Roboto, a new high DPI optimised font&lt;/h4&gt;

&lt;p&gt;Times change fast on mobile. Back when Android was first released, Google worked with Ascender Corp to produce the &lt;a href="http://www.droidfonts.com/" target="_blank"&gt;Droid family of fonts&lt;/a&gt;. One of the main design goals was to produce a font that worked well at small sizes on the restricted resolutions of mobile devices at the time. Thus, the letterforms were condensed to fit as maximise how much text could fit on screen.&lt;/p&gt;

&lt;p&gt;Fast forward to today and mobiles are ever increasing in both DPI and screen real estate (Galaxy Nexus has a 4.65 inch display at 330ppi!), and mobile platforms have expanded to tablets. With these new circumstances, Google has developed a new font in house by  &lt;a href="http://betatype.com/" target="_blank"&gt;Christian Robertson&lt;/a&gt; called Roboto.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lte188C0vP1qmllqg.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;The font has been created from scratch for high DPI screens. It is a geometric font, somewhat reminiscent of Helvetica. As it is the default font, this is the font your site will be using unless you specify otherwise. You should be able to use it where you use arial or helvetica today without any problems. As it is included in an open source product, it will assumably be available to download freely, just like Google allowed with the &lt;a href="http://www.google.com/webfonts/specimen/Droid+Serif" target="_blank"&gt;Droid family&lt;/a&gt;. Be careful if you were planning to use it on desktop platforms however. In a comment &lt;a href="http://typographica.org/2011/on-typography/roboto-typeface-is-a-four-headed-frankenstein/" target="_blank"&gt;in defence of the font&lt;/a&gt;, Robertson stated:&lt;/p&gt;

&lt;blockquote&gt;
since Android doesn’t use much of the nastiness that is TrueType hinting, Roboto is not hinted to support older Windows browsers, for example.
&lt;/blockquote&gt;

&lt;p&gt;He mentions a few of the design choices in that post, and it is will worth a read. It remains to be seen whether the font gets accepted in the design community, and we will have to see it in its native environment, but I personally feel the UI looks much more fresher with it. I’m unsure of the Droid family, or any other fonts are also available for developers. I expect there should be at least one serif font, but you never know.&lt;/p&gt;

&lt;h4&gt;WebKit enhancements&lt;/h4&gt;

&lt;p&gt;One of the key things for web developers is the capabilities of the web browser. The Android browser has always lagged its desktop cousin, and was stating to get a bit of a bad reputation with web developers. Although they haven’t switched to Chrome (yet) in Android, we do get a new version of WebKit. The official docs report that this is &lt;a href="http://developer.android.com/sdk/android-4.0.html" target="_blank"&gt;WebKit 534.30&lt;/a&gt;. By comparing UA strings, it looks like this is the same version used by Chrome 12. However, just because the desktop version supports a feature, it doesn&amp;#8217;t mean the code path was enabled on the Android branch of WebKit, or any porting work was done to expose a feature to the browsers.&lt;/p&gt;

&lt;h5&gt;Performance improvements&lt;/h5&gt;

&lt;p&gt;The Android team has upgraded to a newer version of V8 with crankshaft support. According to the &lt;a href="http://googlesystem.blogspot.com/2011/10/android-ice-cream-sandwich.html" target="_blank"&gt;Unofficial Google system blog&lt;/a&gt; &lt;q&gt;in benchmarks run on a Nexus S device, the Android 4.0 browser showed an improvement of nearly 220% over the Android 2.3 browser in the V8 Benchmark Suite and more than 35% in the SunSpider 9.1 JavaScript Benchmark. That’s not too shabby.&lt;/q&gt;&lt;/p&gt;

&lt;h5&gt;New on phones&lt;/h5&gt;

&lt;p&gt;While tablets have been running Honeycomb, phones have been stuck on Gingerbread. If you’re developing towards phones, then all the features added to Honeycomb will be available to you for the first time. Highlights include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/Graphics/SVG/" target="_blank"&gt;SVG&lt;/a&gt; (Finally!)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-3d-transforms/" target="_blank"&gt;CSS3&amp;#160;3D Transforms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/orientation-event/" target="_blank"&gt;Device Orientation Events&lt;/a&gt; (access to compass/direction)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/FileAPI/" target="_blank"&gt;File API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/html5/scripting-1.html#attr-script-async" target="_blank"&gt;HTML5 async and defer attributes for scripts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/XMLHttpRequest2/" target="_blank"&gt;XHR2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#dfnReturnLink-3" target="_blank"&gt;classList&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h5&gt;New since Honeycomb&lt;/h5&gt;

&lt;p&gt;There are not a huge number of toys to play with, but there are a few including:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/html5/interactive-elements.html#the-details-element" target="_blank"&gt;HTML5 Details and summary elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/FileAPI/#url" target="_blank"&gt;Blob URIs from File API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.khronos.org/registry/typedarray/specs/latest/" target="_blank"&gt;TypedArrays&lt;/a&gt; (Originally from WebGL)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/navigation-timing/" target="_blank"&gt;Navigation Timing&lt;/a&gt; (performance spec)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-images/" target="_blank"&gt;Updated CSS3 gradients to specced version&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Thanks to &lt;a href="http://caniuse.com/#compare=y&amp;amp;b1=android+3&amp;amp;b2=android+4" target="_blank"&gt;caniuse.com&lt;/a&gt; for the comparison data.&lt;/p&gt;

&lt;h5&gt;What’s missing?&lt;/h5&gt;

&lt;p&gt;So that WebKit version that corresponds to Chrome 12? How does it really stack up? Well a pretty huge difference actually. Some of the key things still still missing include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;WebGL&lt;/li&gt;
&lt;li&gt;WebWorkers&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;Server Sent Events&lt;/li&gt;
&lt;li&gt;IndexedDB&lt;/li&gt;
&lt;li&gt;Drag and Drop&lt;/li&gt;
&lt;li&gt;History API&lt;/li&gt;
&lt;li&gt;HTML5 Forms (would be very useful on mobile)&lt;/li&gt;
&lt;li&gt;Progress and Meter&lt;/li&gt;
&lt;li&gt;File Writer &lt;/li&gt;
&lt;li&gt;SVG Filters&lt;/li&gt;
&lt;li&gt;Web Notifications (these are almost like they were designed for mobile)&lt;/li&gt;
&lt;li&gt;WOFF (although does anyone use WOFF now TTF is well supported?)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;This is not to mention the features that have been added since Chrome 12. Our new Chrome overlords &lt;a href="http://news.cnet.com/8301-30685_3-20095696-264/google-move-hints-at-chrome-for-android/" target="_blank"&gt;can’t come soon enough&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;So where are we at?&lt;/h4&gt;

&lt;p&gt;We have some thinking to do regarding desktop sites on mobile being within easier reach, no matter if we like it or not. We have a new font similar to Helvetica as a new font, and a faster more standards web browser to play with. On the whole it is a competent update, but hardly earth shattering for web developers. The Safari browser on iOS is still ahead in &lt;a href="http://caniuse.com/#compare=y&amp;amp;b1=ios_saf+5&amp;amp;b2=android+4" target="_blank"&gt;a number of key areas&lt;/a&gt; in terms of standards support.  With Opera Mobile 11.50 reaching 285 on the &lt;a href="http://html5test.com/results-tablets.html" target="_blank"&gt;HTML5test&lt;/a&gt; (not featured on the site yet, nor is Android 4), I expect that still has the best standards support on Android currently.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11715026741</link><guid>http://generatedcontent.org/post/11715026741</guid><pubDate>Thu, 20 Oct 2011 17:59:43 -0700</pubDate><category>android</category><category>webkit</category><category>Ice Cream Sandwich</category><category>mobile</category></item><item><title>Web Notifications</title><description>&lt;p&gt;One of the traditional advantages of native apps over the Web is that they can access the platform’s built in notification system. Mobile operating systems generally have their own baked in, while desktop OS like Mac OS X have commonly found 3rd party notification systems such as &lt;a href="http://growl.info/" target="_blank"&gt;Growl&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lt8mlpvJ4l1qmllqg.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;In the near future, we should be able to take advantage of this kind of functionality in our web apps as well. The &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html" target="_blank"&gt;Web Notifications&lt;/a&gt; specification provides us with this ability. This defines what are known as &lt;em&gt;simple notifications&lt;/em&gt;. With simple notifications it is possible to create a notification which contains an icon, title, and body test. This can then be displayed by the notification system that the browser/user-agent hooks into. The spec doesn’t define this, so the user-agent can either roll its own, or use an existing system made available by the operating system.&lt;/p&gt;

&lt;h4&gt;Current support&lt;/h4&gt;

&lt;p&gt;The support situation doesn’t look too good at present. There are two implementations, one in Chrome, and one in Firefox Mobile. There is no support in desktop Firefox, and no support in the Android browser. The two implementations are far from interoperable, and both diverge quite a bit from the spec. The spec divergence is assumably because the spec has changed since it was implemented. It is possible to write code to make notifications work in both browsers however, although it won&amp;#8217;t follow the current spec. With some more work it may be possible to write a polyfill though.&lt;/p&gt;

&lt;h4&gt;Displaying a notification&lt;/h4&gt;

&lt;h5&gt;Checking and asking for permission from the user&lt;/h5&gt;

&lt;p&gt;As notifications can be intrusive (imagine what advertising companies and spammers could do with it if they could just post notifications as they saw fit?) the first thing you need to do is request permission from the user.  You can also check what the current permission level is, so that you can take appropriate action.&lt;/p&gt;

&lt;p&gt;In the spec this is handed off to the &lt;a href="http://dev.w3.org/2009/dap/perms/FeaturePermissions.html" target="_blank"&gt;Feature Permissions&lt;/a&gt; spec. This spec defines a common model that will be used by all features that have to ask the user for permission. You can ask for the current permission level using something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
var level = navigator.permissionLevel("notifications");

&lt;/pre&gt;



&lt;p&gt;The &lt;a href="http://dev.w3.org/2009/dap/perms/FeaturePermissions.html#widl-NavigatorPermissions-permissionLevel-long-in-DOMString-feature" target="_blank"&gt;&lt;code&gt;permissionLevel&lt;/code&gt;&lt;/a&gt; method accepts a string that identifies the feature (&amp;#8220;notifications&amp;#8221; in this case), and returns one of the permission values USER_ALLOWED, DEFAULT_ALLOWED, DEFAULT_DENIED or USER_DENIED. The default value before asking for permission is either DEFAULT_ALLOWED or DEFAULT_DENIED. It is up to the user-agent to define what the default value is. You could imagine that in a web browser on the Web it would be DEFAULT_DENIED (this is how both current implementations act), but with installable applications such as Widgets, permissions could be set up front during installation and default could be set to DEFAULT_ALLOWED.&lt;/p&gt;

&lt;p&gt;If the permission level is DEFAULT_DENIED, you have to ask the user for permission. This is done with the &lt;a href="http://dev.w3.org/2009/dap/perms/FeaturePermissions.html#widl-NavigatorPermissions-requestPermission-void-in-DOMString-feature-in-Function-callback" target="_blank"&gt;&lt;code&gt;requestPermission&lt;/code&gt;&lt;/a&gt; function. Like &lt;code&gt;permissionLevel&lt;/code&gt; it accepts a feature string as an parameter. The &lt;code&gt;requestPermission&lt;/code&gt; method is asynchronous so it also accepts a callback parameter that fires after the user has responded to the prompt to give or deny permission. This gives you a chance to respond to the users choice.&lt;/p&gt;

&lt;p&gt;It is important to note that you can not just call &lt;code&gt;requestPermission&lt;/code&gt; in script. It is required that it can only be called after a user gesture, such as when they have pressed a key, or clicked a button or link. You can do this with an &lt;code&gt;onclick&lt;/code&gt; event handler function for example. This is presumably to stop malicious scripts from inundating the user with requests without the user taking any action.&lt;/p&gt;

&lt;p&gt;This would all be well and good, but neither of the implementations currently work this way. In Firefox Mobile there is no way (that I could see) to request the permission level or to ask for permission. Instead, Firefox Mobile asks permission automatically when you try to create  notification. Chrome on the other hand defines similar but different methods on the &lt;a href="http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification" target="_blank"&gt;&lt;code&gt;NotificationCenter&lt;/code&gt;&lt;/a&gt; interface–accessed via &lt;code&gt;window.webkitNotifications&lt;/code&gt;–along with methods for creating the notifications (more on them later). If you understood the previous concepts then it is easy enough though. Lets look at a quick example using WebKit’s API:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
var level = webkitNotifications.checkPermission();

document.getElementById("permission").addEventListener("click", function() {
    // if checkPermission returns 1 then permission needs to be requested
    if (level === 1) {
         webkitNotifications.requestPermission();
    }
}, false);

&lt;/pre&gt;



&lt;p&gt;In the example above we first check the permission level. In a real example we would probably do something with this such as show, hide, or disable a button to request the users permission.&lt;/p&gt;

&lt;p&gt;Next we add an event listener to an element, and when the &lt;code&gt;click&lt;/code&gt; event fires we check if the permission level is 1 (PERMISSION_NOT_ALLOWED), and then request permission if so. A dialog should then show in Chrome asking to accept or deny permission. If the user accepts  the permission value will change to 0 (PERMISSION_ALLOWED) and if they deny it will change to 2 (PERMISSION_DENIED). If the user denies access then we can not ask for permission again unless the user goes into settings and removes the block.&lt;/p&gt;

&lt;p&gt;As you will be able to see, the basic concept is the same as the spec, but the access point and values are quite different.&lt;/p&gt;

&lt;h5&gt;Creating the notification&lt;/h5&gt;

&lt;p&gt;Once the user has given permission then we can create the notification. As is common with the support for this spec, there is three different ways: the spec, WebKit implementation, and Gecko implementation.&lt;/p&gt;

&lt;p&gt;The spec defines that &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-notification" target="_blank"&gt;notifications are created&lt;/a&gt; as follows:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
var notify = new Notification("avatar.png", "Notification title", "Notification body text");
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;In WebKit and Gecko we use the &lt;code&gt;createNotification&lt;/code&gt; method on the same interface we used for checking for permission. The Gecko interface is &lt;a href=":https://developer.mozilla.org/en/DOM/navigator.mozNotificatio%22" target="_blank"&gt;named slightly differently&lt;/a&gt;, uses the moz prefix and can be found on the navigator object instead. It also reorders the parameters just to make life more interesting:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
    var notify,
        iconURL = "http://a2.twimg.com/profile_images/301953578/Picture_4_normal.png",
        title = "You have a new notification",
        desc = "Isn\u2019t that fantastic?";&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    // creating a notification in Gecko 
if (navigator.mozNotification) {
    notify = navigator.mozNotification.createNotification(title, desc, iconURL);
} else if (window.webkitNotifications) {
    // create same notification in WebKit.
    notify = webkitNotifications.createNotification(iconURL, title, desc);  
}
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Note that the URL for the icon is last in Gecko (it is also optional), and that WebKit use plural for &lt;a href="http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification" target="_blank"&gt;&lt;code&gt;webkitNotifications&lt;/code&gt;&lt;/a&gt;. If you don’t want to set one of the parameters you can always send an empty string. Once we&amp;#8217;ve finished we end up with a notification object in all three versions.&lt;/p&gt;

&lt;h5&gt;Showing the notification&lt;/h5&gt;

&lt;p&gt;This is the easy part. All three use the &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-show" target="_blank"&gt;&lt;code&gt;show()&lt;/code&gt;&lt;/a&gt; method on the notification object!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
notify.show();&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;After calling this we will see our notification on screen. Chrome rolls its own UI for notifications, which is shown at the top right of the screen by default. Firefox Mobile uses Growl on Mac and the native notifications draw on Android.&lt;/p&gt;

&lt;h4&gt;Responding to events&lt;/h4&gt;

&lt;p&gt;There are a number of things we can do once a notification is shown:&lt;/p&gt;

&lt;h5&gt;Reacting to showing the notification&lt;/h5&gt;

&lt;p&gt;When a notification is shown the &lt;code&gt;show&lt;/code&gt; event is fired. Except in the WebKit implementation it is the &lt;code&gt;display&lt;/code&gt; event. And the Gecko implementation doesn’t support this at all.  We can handle the show/display event to respond in some way to the notification being shown:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
notify.onshow  = notify.ondisplay = function() { setTimeout(function() { notify.cancel(); }, 3000); }
// after we call show(), the show event will fire and will be handled by the line above
notify.show();&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;In this example I’m using either an &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-onshow" target="_blank"&gt;onshow&lt;/a&gt; or ondisplay event handler to set the timeout to 3 seconds from the moment the show (spec) or display (WebKit) events are fired. Once the timeout is over &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-cancel" target="_blank"&gt;&lt;code&gt;cancel()&lt;/code&gt;&lt;/a&gt; is called, which closes the notification (Gecko doesn&amp;#8217;t support this either).&lt;/p&gt;

&lt;h5&gt;Reacting to errors&lt;/h5&gt;

&lt;p&gt;After calling &lt;code&gt;show()&lt;/code&gt;, if there is an error that causes the notification not to show (the spec doesn’t define what these errors might be), the &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-onerror" target="_blank"&gt;&lt;code&gt;error&lt;/code&gt;&lt;/a&gt; event is fired. We can then handle the error gracefully.  Except in Gecko, where errors are not supported. You’ll be glad to know that WebKit and the spec match in this case:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
notify.onerror  = function() { 
    // oh no error! fallback to our favourite alert
    alert(title + "\n" + desc);
}
//show the alert and see if there are any errors
notify.show();
&lt;/pre&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;Reacting to clicking on the notification&lt;/h5&gt;

&lt;p&gt;If the user clicks (or touches, or otherwise interacts) with the notification, then the &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-onclick" target="_blank"&gt;&lt;code&gt;click&lt;/code&gt;&lt;/a&gt; event is fired. This is consistent across the spec, WebKit and Gecko, although it isn&amp;#8217;t mentioned in the WebKit spec for some reason. It can be useful for things such as displaying the email mentioned in a new mail notification, or showing the event linked to a calendar event notification.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
notify.onclick  = function() { 
    // go to email
    showEmail(msgId);
}
//show the alert
notify.show();&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;&lt;/p&gt;&lt;h5&gt;Reacting to closing the notification&lt;/h5&gt;

&lt;p&gt;When a notification is closed, such as by the user, by the system, or by calling &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-cancel" target="_blank"&gt;&lt;code&gt;cancel()&lt;/code&gt;&lt;/a&gt; the &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-onclose" target="_blank"&gt;&lt;code&gt;close&lt;/code&gt;&lt;/a&gt; event is fired. This is consistent across the spec, WebKit and Gecko:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
&lt;pre&gt;
//This will be called when the notification is shown, and will close it in 2 seconds
notify.onshow  = notify.ondisplay = function() { setTimeout(function() { notify.cancel(); }, 2000); }
//Once the notification is closed, it will annoy the user with an alert!
notify.onclose  = function() { 
    alert("You dismissed the notification, so I’m going to pop up!");
}
//show the notification 
notify.show();&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;



&lt;p&gt;&lt;/p&gt;&lt;h4&gt;Other options&lt;/h4&gt;

&lt;p&gt;There are a couple more options not covered above.&lt;/p&gt;

&lt;h5&gt;Notification direction&lt;/h5&gt;

&lt;p&gt;It is possible to set the direction of the content in the notification for left to right and right to left text. This is set using the &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-dir" target="_blank"&gt;&lt;code&gt;dir&lt;/code&gt;&lt;/a&gt; attribute of the &lt;code&gt;Notification&lt;/code&gt; interface. The default is &lt;code&gt;auto&lt;/code&gt; which sets the directionality to the directionality of the &lt;code&gt;Document&lt;/code&gt; object. You can set it manually using &lt;code&gt;notify.dir = "rtl"&lt;/code&gt; (such as for Arabic or Hebrew text) or &lt;code&gt;notify.dir="ltr"&lt;/code&gt; for example. This method is not mentioned by the WebKit spec but it is supported. It is not supported by Gecko.&lt;/p&gt;

&lt;h5&gt;Rich notifications using web content&lt;/h5&gt;

&lt;p&gt;It is also possible to create notifications that use web content such as HTML or SVG. This was taken out of the Web Notifications spec however, and placed in its own &lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/publish/WebNotifications.html" target="_blank"&gt;Web URL Notifications&lt;/a&gt; spec. I will not cover it in this article as the spec has not been edited in a year and still follows the conventions in the WebKit implementation (such as using the &lt;code&gt;NotificationCenter&lt;/code&gt; interface) rather than the newer style found in the Web Notifications spec.  I expect this will be updated some time in the future to match the newer spec.&lt;/p&gt;

&lt;h4&gt;Future implementations&lt;/h4&gt;

&lt;p&gt;I’m not aware of any plans to update Gecko or WebKit to the newest spec. The differences are currently quite big, so I would guess they are waiting for the spec to stabilise. Web Notifications are currently on &lt;a href="http://www.phonegap.com/about/roadmap/" target="_blank"&gt;PhoneGap’s roadmap&lt;/a&gt; for December of this year. If this makes it then it will be possible to take advantage of the native notification support on the platforms that PhoneGap supports.&lt;/p&gt;

&lt;h4&gt;Demo time&lt;/h4&gt;

&lt;p&gt;I’ve created a quick, simple demo which works in both Chrome and Firefox Mobile. It attempts to take care of some of the implementation inconsistencies with the spec, but not all. I still use the NotificationCenter to create notification objects and check for and set permissions. It is left as a task to the reader to create a proper polyfill.&lt;/p&gt;

&lt;p&gt;In the demo you can click the &lt;q&gt;authorise&lt;/q&gt; button to grant access if using WebKit. Gecko doesn&amp;#8217;t need this so it will be disabled. Once the permissions are set you can click on the &lt;q&gt;notify me&lt;/q&gt; button to show the notification. After three seconds it will automatically close. On a real site you should be careful of the accessibility considerations of showing and hiding notifications.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lt8mpagJsF1qmllqg.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dl.dropbox.com/u/444684/notifications.html" target="_blank"&gt;View the Web Notifications demo&lt;/a&gt; (Requires Chrome or Firefox Mobile (including the emulator)&lt;/p&gt;

&lt;p&gt;View source to see exactly how it works. I&amp;#8217;ve kept the styles and JavaScript in one file to make it easier to read.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11597158114</link><guid>http://generatedcontent.org/post/11597158114</guid><pubDate>Mon, 17 Oct 2011 19:01:00 -0700</pubDate><category>web notifications</category><category>webkit</category><category>gecko</category><category>mobile</category></item><item><title>Made in England from polished Ankole cattle horn, the only thing...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lt4mb3ROv71r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Made in England from polished &lt;a href="http://en.wikipedia.org/wiki/Ankole-Watusi_(cattle)" target="_blank"&gt;Ankole cattle&lt;/a&gt; horn, the only thing not to like about these whisky tumblers is that they’re sold out. They’re ethically sourced and made in a 170 year old horn works. I’ve always liked natural materials mixed with minimal clean lines, so these sound like the perfect accomplice to a fine single malt Japanese or Scottish whisky. If only they ever come back in stock.&lt;/p&gt;

&lt;p&gt;Best Made are famous for their hand crafted axes, but they sell a whole host of amazing objects. Go check out the &lt;a href="http://www.bestmadeco.com/" target="_blank"&gt;Best Made&lt;/a&gt; web site for more information.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11494171748</link><guid>http://generatedcontent.org/post/11494171748</guid><pubDate>Sat, 15 Oct 2011 14:30:09 -0700</pubDate><category>horn</category><category>tumbler</category><category>whisky</category><category>bestmade</category></item><item><title>New standards support in Opera 12 alpha</title><description>&lt;p&gt;I couldn’t find anywhere that lists the new standards support in Opera 12 alpha all in one place, so I thought I’d write it up here for my own benefit. You might also find it useful.&lt;/p&gt;

&lt;p&gt;Opera 11.51 uses Presto 2.9, milestone 168, while while the alpha version of Opera 12 has been upgraded to milestone 220. The way Opera works is they have regular milestone releases of their core Presto rendering engine, that may include one or more tasks. These tasks could be anything from something big like a whole new feature (e.g. WebGL), to a raft of performance enhancements, to a group of bug fixes for site compatibility reasons.&lt;/p&gt;

&lt;p&gt;The latter doesn’t get much column inches but they’re a vital part of the health of a browser. There will be hundreds, if not thousands of these small fixes in the alpha release. In theory, with every new release the browser will work better with the top sites (well until someone releases a new site that wasn’t tested, and the process of identifying issues, analysing, making test cases, bug fixing, integration, and releasing happens all over again), and existing features will get more compliant with the spec.&lt;/p&gt;

&lt;p&gt;This blog post is about the new features though, so lets take a look at what they are.&lt;/p&gt;

&lt;h5&gt;HTML5 parser&lt;/h5&gt;

&lt;p&gt;This is probably the star of the show in Opera 12 alpha, even if perhaps the least glamourous. The old HTML4 parser has been thrown away and replaced with Ragnarök, the new HTML5 parser. If you code your pages correctly then you will not notice much difference, but if you do not create well formed markup (such as using incorrect nesting), then Opera will render more consistently with other browsers. This is because up until HTML5, the HTML spec only defined what should happen when markup was valid. Unfortunately this wasn&amp;#8217;t enough as many sites do things incorrectly. Now in HTML5 the error handling is defined, so all browsers should in theory do the same thing. I know this was a huge task in of its own, but it will likely fix thousands of pages.&lt;/p&gt;

&lt;p&gt;You do get some new things to play with though. With the HTML5 parser, SVG and MathML can be used in HTML documents. Previously they had to be used with documents served as XML (such as XHTML).&lt;/p&gt;

&lt;h4&gt;Enhanced HTML5 Video&lt;/h4&gt;

&lt;p&gt;Opera’s HTML5 video support has been enhanced to add two new attributes and two new DOM properties:&lt;/p&gt;

&lt;h5&gt;Preload attribute&lt;/h5&gt;

&lt;p&gt;The &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#attr-media-preload" target="_blank"&gt;&lt;code&gt;preload&lt;/code&gt;&lt;/a&gt; attribute allows you to control if the video resource is automatically downloaded on page load. It accepts three values: &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;metadata&lt;/code&gt;, and &lt;code&gt;auto&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you use &lt;code&gt;preload="none"&lt;/code&gt; then the resource will not be downloaded in advance of pressing the play button (or other method of starting the download). You could imagine this being useful on constraint networks or when multiple videos are included in one page.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;metadata&lt;/code&gt; value will fetch the video metadata, such as the first frame (e.g. to use as a poster placeholder), duration of the video, size, track list, etc.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;auto&lt;/code&gt; value says that the browser is free to download the entire video resource without the user explicitly requesting it, or a script fetching it. If you just use the &lt;code&gt;preload&lt;/code&gt; attribute on its own without a value, it is equivalent of using &lt;code&gt;auto&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Not specifying a &lt;code&gt;preload&lt;/code&gt; attribute at all is left for the browser to define, but the &lt;code&gt;metadata&lt;/code&gt; value is suggested as a default value in the spec. Although the author can specify these values, they are not gospel. By spec, the user agent is allowed to just use the value as a hint and do what it thinks is best for the user. A mobile browser for example could preload on wifi when using the &lt;code&gt;auto&lt;/code&gt; value, but just download the metadata if using the radio connection.&lt;/p&gt;

&lt;h5&gt;Muted attribute&lt;/h5&gt;

&lt;p&gt;The &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#attr-media-muted" target="_blank"&gt;&lt;code&gt;muted&lt;/code&gt;&lt;/a&gt; boolean attribute defines if the audio in a media file is muted or not. If the &lt;code&gt;muted&lt;/code&gt; attribute is present the sound is disabled. This attribute is not dynamic, so if the attribute is added via script at a later date it will not mute the sound. It only effects the default state.&lt;/p&gt;

&lt;h5&gt;Buffered property&lt;/h5&gt;

&lt;p&gt;The &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-buffered" target="_blank"&gt;&lt;code&gt;buffered&lt;/code&gt;&lt;/a&gt; property (called attribute in the spec, but named property here to avoid confusion with attributes in HTML) is a member of the &lt;code&gt;HTMLMediaElement&lt;/code&gt; DOM interface. If you call &lt;code&gt;media.buffered&lt;/code&gt; it will return a &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#timeranges" target="_blank"&gt;&lt;code&gt;TimeRanges&lt;/code&gt;&lt;/a&gt; object. This represents the range of the resource that has been buffered by the browser. This object contains the length of the buffered resource, the time where the buffering starts and the time when it ends.&lt;/p&gt;

&lt;h5&gt;Seekable property&lt;/h5&gt;

&lt;p&gt;The &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-seekable" target="_blank"&gt;&lt;code&gt;seekable&lt;/code&gt;&lt;/a&gt; property works much in the same way as the &lt;code&gt;buffered&lt;/code&gt; property, returning a &lt;code&gt;TimeRanges&lt;/code&gt; object. However, this represents the range that the browser can seek to in the resource. If the browser can seek to anywhere in the file then the range will be the entire video length.&lt;/p&gt;

&lt;h4&gt;Complete ES5.1 support&lt;/h4&gt;

&lt;p&gt;Opera has lagged behind for quite a while with its &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" target="_blank"&gt;ECMAScipt 5&lt;/a&gt; support. With Opera 12 alpha it now has complete support and passes all the tests in the test suite, bar one test which is believed to be &lt;a href="https://bugs.ecmascript.org/show_bug.cgi?id=179" target="_blank"&gt;invalid&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This improved support includes:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Object.create&lt;/li&gt;
&lt;li&gt;Object.defineProperty&lt;/li&gt;
&lt;li&gt;Object.defineProperties&lt;/li&gt;
&lt;li&gt;Object.getPrototypeOf&lt;/li&gt;
&lt;li&gt;Object.keys&lt;/li&gt;
&lt;li&gt;Object.seal&lt;/li&gt;
&lt;li&gt;Object.freeze&lt;/li&gt;
&lt;li&gt;Object.preventExtensions&lt;/li&gt;
&lt;li&gt;Object.isSealed&lt;/li&gt;
&lt;li&gt;Object.isFrozen&lt;/li&gt;
&lt;li&gt;Object.isExtensible&lt;/li&gt;
&lt;li&gt;Object.getOwnPropertyDescriptor&lt;/li&gt;
&lt;li&gt;Object.getOwnPropertyNames&lt;/li&gt;
&lt;li&gt;Function.prototype.bind&lt;/li&gt;
&lt;li&gt;Reserved words as property names&lt;/li&gt;
&lt;li&gt;Strict Mode&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now we are more or less just waiting for older browsers to die out before ES5 is usable across the board.&lt;/p&gt;

&lt;h4&gt;DOM 3 Events isTrusted property&lt;/h4&gt;

&lt;p&gt;The &lt;a href="http://www.w3.org/TR/DOM-Level-3-Events/#events-event-type-isTrusted" target="_blank"&gt;&lt;code&gt;isTrusted&lt;/code&gt;&lt;/a&gt; property from the &lt;code&gt;Event&lt;/code&gt; interface  has been added. It is a boolean property that reports if the event was generated by the user agent (a trusted event, thus true) or by a script (untrusted event, thus false).  Trusted events are given heightened privileges. See &lt;a href="http://www.w3.org/TR/DOM-Level-3-Events/#trusted-events" target="_blank"&gt;trusted events in the DOM3 Events spec&lt;/a&gt; for further details.&lt;/p&gt;

&lt;h4&gt;Microdata&lt;/h4&gt;

&lt;p&gt;Opera 12 is the first browser to support the &lt;a href="http://dev.w3.org/html5/md/" target="_blank"&gt;HTML Microdata&lt;/a&gt; spec (formally specified in HTML the living standard (née HMTL5)). This is a way to add machine readable semantic structured data to a document. If you know about &lt;a href="http://microformats.org/" target="_blank"&gt;Microformats&lt;/a&gt; then it is roughly the same idea, except it uses its own set of attributes and API rather than using (or abusing, depending on which camp you are in) existing HTML attributes. This spec is fairly controversial as it also steps on the toes of the pre-existing &lt;a href="http://www.w3.org/TR/xhtml-rdfa-primer/" target="_blank"&gt;RDFa&lt;/a&gt; specification.&lt;/p&gt;

&lt;p&gt;In the end it will be the survival of the fittest with which one wins out. Most likely driven by user agent and developer adoption. Microdata looks like it is winning out so far with the former (with Motorola also showing interest in implementing it in WebKit), and the &lt;a href="http://schema.org/" target="_blank"&gt;Schema.org&lt;/a&gt; initiative (a collaboration between Google, Microsoft and Yahoo!) have also chosen it. The scheme.org work is also not without controversy itself, so it is still all to play for.&lt;/p&gt;

&lt;h4&gt;Typed Arrays&lt;/h4&gt;

&lt;p&gt;Support has been added for ECMAScript &lt;a href="https://www.khronos.org/registry/typedarray/specs/latest/" target="_blank"&gt;Typed Arrays&lt;/a&gt;. This is a specification made by the Khronos group to support WebGL. Typed Arrays allow the developer to work with binary data. This is needed for high performance tasks such as 3D games. The spec itself states:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ECMAScript [ECMA-262] has traditionally been used in contexts where there is no access to binary data. Where binary data has needed to be manipulated, it is often stored as a String and accessed using charCodeAt(), or stored as an Array with conversion to and from base64 for transmission. Both of these methods are slow and error-prone. For example, reading binary data as 32-bit integers requires manual conversion of 4 source bytes to and from the target type. Reading floating-point data is even more expensive.&lt;/p&gt;
&lt;p&gt;
 As web applications gain access to new functionality, working with binary data has become a much-demanded feature. Current specifications such as the File API [FILEAPI] and Web Sockets [WEBSOCKETS] would benefit from being able to read and write binary data directly in its native form. Specifications such as WebGL [WEBGL] require this functionality to meet acceptable performance characteristics. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;WebGL and hardware acceleration&lt;/h4&gt;

&lt;p&gt;Opera&amp;#8217;s graphics library Vega is now hardware accelerated in Opera 12 alpha. All of the browser UI and web page content is rendered by the GPU if possible.&lt;/p&gt;

&lt;p&gt;Having hardware acceleration and Typed Arrays opens the door for &lt;a href="http://www.khronos.org/webgl/" target="_blank"&gt;WebGL&lt;/a&gt;. WebGL is the 3D context for the canvas element. It is a low level 3D graphics API, which is based on OpenGL ES 2.0, supporting GLSL shaders. This allows for 3D applications such as games to be developed only using web technologies. Try out &lt;a href="http://operasoftware.github.com/Emberwind/" target="_blank"&gt;the HTML5 port of Emberwind&lt;/a&gt; to see what it is capable of. The game can be played using 2D canvas or WebGL so you can compare the performance difference between the two.&lt;/p&gt;

&lt;h4&gt;Radial Gradients&lt;/h4&gt;

&lt;p&gt;Linear gradients from CSS3 Image values were already supported by Opera. Radial gradients didn&amp;#8217;t make the cut, but are now supported in Opera 12 alpha. As the name suggests, &lt;a href="http://dev.w3.org/csswg/css3-images/#radial-gradients" target="_blank"&gt;&lt;code&gt;radial-gradient()&lt;/code&gt;&lt;/a&gt; allow for gradients made out of concentric circles or ellipses. There is also support for &lt;code&gt;repeating-radial-gradient()&lt;/code&gt;. They both take the -o- prefix.&lt;/p&gt;

&lt;p&gt;Support for gradients has been extended so that as well as &lt;code&gt;background&lt;/code&gt;/&lt;code&gt;background-image&lt;/code&gt;, they can be used with &lt;code&gt;border-image&lt;/code&gt; and &lt;code&gt;list-style-image&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For a preview of gradients in action check out Lea Verou’s &lt;a href="http://leaverou.me/css3patterns/" target="_blank"&gt;pattern gallery&lt;/a&gt; in Opera 12 alpha.&lt;/p&gt;

&lt;h4&gt;The rem unit&lt;/h4&gt;

&lt;p&gt;Nothing related to &lt;a href="http://twitter.com/#!/rem" target="_blank"&gt;Remy Sharp&lt;/a&gt;, although I&amp;#8217;m sure it is his favourite part of CSS3, the &lt;a href="http://www.w3.org/TR/css3-values/#font-relative-lengths" target="_blank"&gt;&lt;code&gt;rem&lt;/code&gt;&lt;/a&gt; unit from CSS3 Values and Units maps to the &lt;code&gt;font-size&lt;/code&gt; of the root element (&lt;code&gt;html&lt;/code&gt; in HTML). If the font size of the &lt;code&gt;html&lt;/code&gt; element is 12px then 1rem will also be 12 pixels. This is useful when trying to achieve &lt;a href="http://24ways.org/2006/compose-to-a-vertical-rhythm" target="_blank"&gt;vertical rhythm&lt;/a&gt; on a page, as it is easier than calculating em sizes, which change element to element based on its parent.&lt;/p&gt;

&lt;h4&gt;Bug fixes which are useful to know&lt;/h4&gt;

&lt;p&gt;Although there were a lot of bug fixes, a few may effect developers and are useful to know:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The &lt;code&gt;inset&lt;/code&gt; keyword on &lt;code&gt;box-shadow&lt;/code&gt; now works on &lt;code&gt;input&lt;/code&gt; elements&lt;/li&gt;
&lt;li&gt;Co-ordinate handling has been improved, so values can be used larger than the magic 32768px without pages breaking in Opera. This has been a painful bug for quite a while!&lt;/li&gt;
&lt;li&gt;HTML5 URL input fields (&lt;code&gt;type="url"&lt;/code&gt;) are now the same width as regular text fields&lt;/li&gt;
&lt;li&gt;&lt;code&gt;display: list-item&lt;/code&gt; has been updated to be compliant with the CSS 2.1 spec&lt;/li&gt;
&lt;li&gt;&lt;code&gt;border-radius&lt;/code&gt; will now  clip replaced content. No more images overlapping over your nice rounded corners! Not that round corners are in fashion any more&lt;/li&gt;
&lt;li&gt;&lt;code&gt;HTMLHeadElement.profile&lt;/code&gt; has been removed due to being obsolete in the HTML5 spec&lt;/li&gt;
&lt;li&gt;&lt;code&gt;addEventListener&lt;/code&gt; and &lt;code&gt;removeEventListener&lt;/code&gt;&amp;#8217;s capture parameter now defaults to false&lt;/li&gt;
&lt;li&gt;XML documents no longer show a parse error when badly formed. They now just show an error in the console&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;That is quite a lot of new features in a relatively short period of time, so I haven&amp;#8217;t had chance to try them all myself yet. Opera 12 is shaping up to be a good release, and has even leapfrogged Chrome on the &lt;a href="http://html5test.com/" target="_blank"&gt;HTML5test&lt;/a&gt; with 346 points if you enable WebSockets, and is only 7 points behind if you keep them disabled. There is now a clear race on for first place. Chrome is not standing still and moving fast, but Opera 12 likely still has some things up its sleeve. HTML5 drag &amp;#8216;n&amp;#8217; drop has yet to make an appearance for example, and &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video-conferencing-and-peer-to-peer-communication.html" target="_blank"&gt;&lt;code&gt;getUserMedia()&lt;/code&gt;&lt;/a&gt; (access to the video camera) has been demoed on Android, so could make an appearance on desktop too. I wouldn&amp;#8217;t bet against it when you see images such as the following in Opera’s press event:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://files.myopera.com/EspenAO/albums/9327652/_MG_5014.jpg" title="that’s my ex boss. Hi!"/&gt;&lt;/p&gt;

&lt;p&gt;This alone would give Opera 20 more points on that particular browser test. Its certainly an interesting time in the browser wars, with a lot of toys for us developers to play with.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11455691366</link><guid>http://generatedcontent.org/post/11455691366</guid><pubDate>Fri, 14 Oct 2011 17:07:00 -0700</pubDate><category>opera 12</category><category>presto</category><category>webgl</category><category>gradients</category><category>css3</category><category>html5</category><category>dom3</category><category>html5 video</category></item><item><title>HTML5 scoped attribute</title><description>&lt;p&gt;The HTML5 spec adds the &lt;a href="http://www.w3.org/TR/html5/semantics.html#attr-style-scoped" target="_blank"&gt;&lt;code&gt;scoped&lt;/code&gt;&lt;/a&gt; attribute to &lt;code&gt;style&lt;/code&gt; elements. What does this do, and how can it be useful?&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;scoped&lt;/code&gt; attribute is used to limit the scope of the CSS rules inside the &lt;code&gt;style&lt;/code&gt; element to that element’s &lt;em&gt;parent&lt;/em&gt; and &lt;em&gt;all the children&lt;/em&gt; of the parent. All other elements outside of the scope do not get styled, even if the selectors match. It is a boolean attribute, so you can use &lt;code&gt;scoped&lt;/code&gt; for HTML and &lt;code&gt;scoped="scoped"&lt;/code&gt; for XML/XHMTL. The use of scoped style sheets is best illustrated with an example:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Scoped example&amp;lt;/title&amp;gt;
        &amp;lt;style&amp;gt;
            p { color: black; }
        &amp;lt;/style&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;p&amp;gt;The text in this paragraph will be black&amp;lt;/p&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;style &lt;strong&gt;scoped&lt;/strong&gt;&amp;gt;
                p { color: green; }
            &amp;lt;/style&amp;gt;
            &amp;lt;p&amp;gt;The text in this paragraph will be green&amp;lt;/p&amp;gt;
            &amp;lt;p&amp;gt;And in this paragraph too&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;p&amp;gt;This paragraph is out of scope so will be black&amp;lt;/p&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;In compliant browsers, the two paragraphs inside the &lt;code&gt;div&lt;/code&gt; element will receive a text colour of green, while all other paragraphs will be black. Any styles in the scoped style element only apply to the parent element (the &lt;code&gt;div&lt;/code&gt;) and its children (the two &lt;code&gt;p&lt;/code&gt; elements).&lt;/p&gt;

&lt;p&gt;There is a bit more to it though.  Any &lt;code&gt;@page&lt;/code&gt; rules in scoped style sheets are dropped. Also if a font is linked via &lt;code&gt;@font-face&lt;/code&gt; then that font will not be used for elements out of scope, even if they have a &lt;code&gt;font-family&lt;/code&gt; applied to them which matches the name given in the &lt;code&gt;@font-face&lt;/code&gt; rule in the scoped style sheet.&lt;/p&gt;

&lt;h4&gt;Why use scoped style sheets?&lt;/h4&gt;

&lt;p&gt;The first thought might be why should I use this? When you put a style element within your HTML then it isn&amp;#8217;t too different to using inline styles (minus the specificity concerns). I strongly believe that we should strive for separation of concerns, and John Allsopp makes &lt;a href="http://www.webdirections.org/blog/on-the-abominable-proposed-html5-scoped-attribute-for-style-elements/" target="_blank"&gt;some good augments&lt;/a&gt; about this on his blog.&lt;/p&gt;

&lt;p&gt;However, there are some valid use cases for it. One use case that comes to mind is when using demos in your page. Instead of giving everything ids or classes, you can use a scoped style sheet that you can guarantee will only apply to the demo. That is a bit esoteric compared to the average needs of web developers, but it hints at why it is really useful. Web components.&lt;/p&gt;

&lt;p&gt;The Web was primarily used for documents and our languages reflected this. We are increasingly seeing the Web also be used for applications as well. Web apps have their own requirements. We often need rich components and controls, such as custom sliders, buttons, carrousels, accordions, etc. A lot of frameworks have sprung up to fill this need, and the &lt;a href="http://glazkov.com/tag/component-model/" target="_blank"&gt;component model&lt;/a&gt; along with the shadow DOM will hopefully be the standardised solution to this.&lt;/p&gt;

&lt;p&gt;Components built with web technology usually have their own defined style and behaviour. We want the styling of these controls to be self contained and not leak out to the rest of the document. Scoped style sheets are one solution to this. It avoids having to hack in name spaces, such as trying to use a unique id and using this with each style rule (which can also lead to specificity hell), or inline style (which is even worse). With scoped style sheets we can be sure that the styles will only apply to the HTML of the component, and can style be easily overridden by other rules if we need to customise the component.&lt;/p&gt;

&lt;h4&gt;Where can I use them?&lt;/h4&gt;

&lt;p&gt;If you think &lt;q&gt;Great! which browsers can I use this in?&lt;/q&gt; you’ll be frustrated right now, as no browser or user agent supports the &lt;code&gt;scope&lt;/code&gt; attribute right now. There is &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=49142" target="_blank"&gt;work in progress&lt;/a&gt; in WebKit however, so it may land soon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; This is now supported in nightly builds of WebKit.&lt;/p&gt;

&lt;h4&gt;Wouldn’t it be nice…&lt;/h4&gt;

&lt;p&gt;The main criticism I’ve seen about scoped style sheets is the mixing of concerns issues, and I more or less agree. What I think could be a solution to this (but someone smarter than me probably knows why it can&amp;#8217;t be done) is to allow &lt;code&gt;link&lt;/code&gt; and maybe &lt;code&gt;style&lt;/code&gt; elements in the head to have an option &lt;code&gt;for&lt;/code&gt; attribute, just as &lt;code&gt;label&lt;/code&gt;s do. Then you could do something like &lt;code&gt;&amp;lt;link rel="stylesheet" href="style.css" scoped for="scoped-element" /&amp;gt;&lt;/code&gt; which is scoped to the element (and its children) with the id specified. This would allow you to keep the scoped style sheet in the head of the document where it belongs.&lt;/p&gt;</description><link>http://generatedcontent.org/post/11405550112</link><guid>http://generatedcontent.org/post/11405550112</guid><pubDate>Thu, 13 Oct 2011 13:31:00 -0700</pubDate><category>scoped</category><category>html5</category><category>component model</category><category>w3c</category></item><item><title>What are CSS Shaders?</title><description>&lt;p&gt;Adobe announced a proposal for &lt;a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html" target="_blank"&gt;CSS Shaders&lt;/a&gt; at Adobe Max two days ago. This was backed by both Opera and Apple, and the spec will be developed by the &lt;a href="http://www.w3.org/Graphics/fx/" target="_blank"&gt;FX Task Force&lt;/a&gt; at the W3C. For those of you who are not aware, the FX task force is an elite band of ninjas’s chosen from the ranks of the CSS and SVG Working Groups to work on specs common to both technologies. Their most notable work so far is perhaps the &lt;a href="http://dev.w3.org/Graphics-FX/modules/filters/publish/SVGFilter.html" target="_blank"&gt;Filters Effects 1.0 spec&lt;/a&gt;, but they’re also working on a common model for Transforms and Animations.&lt;/p&gt;

&lt;p&gt;So what exactly is the CSS Shaders proposal, and how does it relate to the existing proposals and technologies? First I will introduce you to the required terminology (you can skip that section if you are already into computer graphics), then I will dig into the proposal and see what it can do. I’m basing this off the spec as I don’t have a build to play with.&lt;/p&gt;

&lt;h4&gt;Shaders terminology&lt;/h4&gt;

&lt;p&gt;A shader is a set of software instructions used to calculate rendering effects (usually) on a GPU. A graphics pipeline takes a representation of what will be rendering using 3D primitives (such as vectors) as an input, and through various stages in the pipeline transforms it, then renders it as a 2D rasterisation (pixels) onto a 2D plane (usually a screen). Traditionally, fixed-function pipelines were used, which support common pre-defined geometry and pixel shading functions (more on these below). With shaders, instead of using pre-defined functions, developers can program their own custom functions to do whatever transformations they want to specify. Due to the pipeline approach, shaders can be chained so that the output of one feeds into the input of the next one. This will be familiar to you if you&amp;#8217;ve used SVG Filters or programs like Automator on Mac or Yahoo! Pipes.&lt;/p&gt;

&lt;p&gt;Their are two main types of shaders in the CSS Shaders spec, which I will describe below.&lt;/p&gt;

&lt;h5&gt;Vertex shaders&lt;/h5&gt;

&lt;p&gt;A vertex shader describe the properties of a vertex (the points at the corners of geometric shapes, usually triangles). These include the position and colour of the vertex, and the texture mapping. If you can imagine a model is represented as a number of triangles, with the vertices at each corner, the shader will transform these vertices, such as change the position in 3D space, the colour, or the depth. This could for example transform a flat shape, such as a flat piece of paper, into something that looks like it has a 3D perspective, such as the curved page of a book. The spec includes examples such as a page curl, waving flag or wobble effect.&lt;/p&gt;

&lt;h5&gt;Fragment shaders&lt;/h5&gt;

&lt;p&gt;Fragment shaders (terminology used in OpenGL and also CSS Shaders) can also go by the name of pixel shaders (used in Direct3D). Fragment shaders describe the properties of pixel, such as the colour, opacity, and bit-depth. As you can imagine from vertex shaders, a fragment shader manipulates these pixels, such as changing the colour. They can be used for things such as lighting effects or colour manipulation such as changing an image to greyscale or sepia tone. You&amp;#8217;ve probably seen a number of these in graphics packages such as Photoshop. CSS Filters includes a number of pre-defined ones, but fragment shaders will allow you to define your own.&lt;/p&gt;

&lt;h4&gt;The CSS Shader proposal&lt;/h4&gt;

&lt;p&gt;Now you have a rough idea of what shaders are, what exactly is the CSS proposal for shaders? At its basic level, the proposal is to bring these effects to HTML and SVG content via CSS. Fragment shaders extends the capability of Filters so that you can define your own pixel manipulations, and vertex shaders brings the new capability of distorting the 2D HTML and SVG elements. The vertices will be drawn as a grid of triangles over the 2D plane of the element(s) in question, and they can be manipulated as mentioned above to make a faux-3D effect on the screen. Shaders are defined to work well with CSS modules such as Transitions and Animations, so that you can animate the distortions, such as turning elements into a waving flag, or a page that curls. As you can imagine combining multiple shaders and animations can produce some very sophisticated effects.&lt;/p&gt;

&lt;h5&gt;Applying shaders with CSS&lt;/h5&gt;

&lt;p&gt;A shader is applied via CSS using the &lt;a href="http://dev.w3.org/Graphics-FX/modules/filters/publish/SVGFilter.html#FilterProperty" target="_blank"&gt;&lt;code&gt;filter&lt;/code&gt;&lt;/a&gt; property from Filters 1.0, or it can be applied to SVG using the &lt;a href="http://dev.w3.org/Graphics-FX/modules/filters/publish/SVGFilter.html#FilterElement" target="_blank"&gt;&lt;code&gt;filter&lt;/code&gt;&lt;/a&gt; element. The &lt;code&gt;filter&lt;/code&gt; property/element is usually used for pre-defined filters. To use a custom shader you use the &lt;code&gt;custom()&lt;/code&gt; function (or feCustom as a child element of the &lt;code&gt;filter&lt;/code&gt; when using SVG elements) as the value. They can be chained with other shaders and built-in filters. For fragment shaders the custom function needs a url that points to the shader and arbitrary optional parameters. The shader is written using a shaders language, which defines the parameters it expects, if any. Vertex shaders are similar but also can accept a vertex mesh as the second argument. This defines how many vertices are used and if it maps to the border box, padding-box, content-box or filter box. The &lt;code&gt;filter&lt;/code&gt; property accepts the functions as a space separated list to allow for chaining. Custom filters are also defined as a space separated list inside the &lt;code&gt;custom()&lt;/code&gt; function. Lets look at a quick example from the spec to make this clearer.&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
 .old-book-page {
        filter: grayscale(1.0) custom(url('book.vs') url('old-page-paper.fs'));
 }
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;filter&lt;/code&gt; property in this example first uses the &lt;code&gt;grayscale()&lt;/code&gt; built-in filter to turn the element black and white. It then feeds the output into the &lt;code&gt;custom()&lt;/code&gt; function. This uses a vertex shader called &lt;code&gt;book.vs&lt;/code&gt; which manipulates the flat element into an open book shape, then applies the &lt;code&gt;old-page-paper.fs&lt;/code&gt; fragment shader to manipulate the pixels to give it an aged look. The shaders found at those URLs will define how these manipulations happen. They don&amp;#8217;t define any custom parameters or a vertex mesh.&lt;/p&gt;

&lt;p&gt;If the elements the filters applies to looks like the following:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/images/intro-filtered-element.png"/&gt;&lt;/p&gt;

&lt;p&gt;After the filter is applied it will turn into the following:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/images/intro-example-2.png"/&gt;&lt;/p&gt;

&lt;p&gt;Lets look an example where the vertex mesh is defined and custom parameters are used. Transitions are also used to animate the vertex shaders.&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
.waving      {
        filter: custom(url('wave.vs'), 20 20, phase 0, amplitude 50);
        transition-property: filter;
        transition-duration: 0.2s;
}

.waving:hover {
        filter: custom(url('wave.vs'), 20 20, phase 90, amplitude 20);
}
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;You may recognise the &lt;code&gt;url&lt;/code&gt; function from the previous example. This links to the custom wave vertex shader. The &lt;code&gt;20 20&lt;/code&gt; after defines the vertex mesh of 22 x 22 vertices. It may seem strange why it makes a 22 x 22 grid rather than 20 x 20, but I will describe later. The phase and amplitude parameters are defined by the shader. These two properties are transitioned over 0.2 seconds, which makes it wave like a flag. The example will look something like the following (minus any animations):&lt;/p&gt;

&lt;p&gt;&lt;img src="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/images/intro-example-1.png"/&gt;&lt;/p&gt;

&lt;h5&gt;Defining a vertex mesh&lt;/h5&gt;

&lt;p&gt;In the above example we used a vertex mesh, which defines the vertices that can be manipulated by the vertex shader. This accepts three values: two integers and a box value. It is specified as the second argument (separated by a comma) in the custom function when using CSS, or using the &lt;code&gt; vertexMesh&lt;/code&gt; attribute of the &lt;code&gt;feCustom&lt;/code&gt; element when using the SVG syntax.&lt;/p&gt;

&lt;p&gt;The first integer defines the number of &lt;em&gt;additional&lt;/em&gt; vertex lines (you can think of this as number of points on the y axis) and the second is the number of &lt;em&gt;additional&lt;/em&gt; vertex columns (you can think of this as the number of points on the x axis). There is however two extra vertices than the number defined. This is because the default value is &lt;code&gt;0 0&lt;/code&gt; which is one line and one column. In this case there are four vertices; one at each corner (top left, bottom left, top right, bottom right). You can see this in the diagram below:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/images/shader-concepts-default-mesh.png"/&gt;&lt;/p&gt;

&lt;p&gt;If you add 1 line and 1 column you get these four vertices at the corners plus the 1 you add in the centre of the row and column. Therefor the algorithm to calculate the number of vertices in each direction is n+2, and to calculate the number of lines or columns it is n+1. This may be confusing, so there is a note in the spec considering if the default should be &lt;code&gt;1 1&lt;/code&gt; instead of &lt;code&gt;0 0&lt;/code&gt;. In the following diagram the vertex mesh is set to &lt;code&gt;5 4&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/images/shader-concepts-finer-mesh.png"/&gt;&lt;/p&gt;

&lt;p&gt;The last parameter is the box value. This is used to align the vertex mesh to the box specified. If it is absent it defaults to &lt;code&gt;filter-box&lt;/code&gt;. This is the border box plus additional filter margins (so that any additional content that through vertex or pixel manipulation is displayed outside the margin box is still visible). The other possible values are &lt;code&gt;border-box&lt;/code&gt;, &lt;code&gt;padding-box&lt;/code&gt; and &lt;code&gt;content-box&lt;/code&gt;, which you are probably already familiar with from the CSS box model. If you are using SVG then &lt;code&gt;border-box&lt;/code&gt; and &lt;code&gt;padding-box&lt;/code&gt; is the equivalent of &lt;code&gt;content-box&lt;/code&gt;. You could imagine a shader specifying a mesh similar to the one in the diagram above, using an explicit box value could be something like the following:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
filter: custom(url('whatever.vs'), 5 4 filter-box);
&lt;/code&gt;
&lt;/pre&gt;

&lt;h5&gt;Defining the shader&lt;/h5&gt;

&lt;p&gt;This is the meat of the shader. It is trivial to add; you just use the &lt;code&gt;url()&lt;/code&gt; function as the first argument of the &lt;code&gt;custom()&lt;/code&gt; function in CSS, or in the &lt;code&gt;vertexShader&lt;/code&gt; or &lt;code&gt;fragmentShader&lt;/code&gt; attribute of the &lt;code&gt;feCustom&lt;/code&gt; element for the SVG syntax. With this you point to the file where the shader is defined. Vertex shaders use the .vs extension and fragment shaders use the .fs extension. Writing the shader is where the hard part comes in. I expect most developers won&amp;#8217;t write their own, and libraries will pop up that define the common ones that are needed.&lt;/p&gt;

&lt;p&gt;The proposal recommends that shaders should is written using GLSL ES. This is the &lt;a href="http://www.khronos.org/files/opengles_shading_language.pdf" target="_blank"&gt;OpenGL ES Shading Language&lt;/a&gt; (PDF link). This was chosen as it is already used in WebGL. Having consistency between both makes sense to me. It is a full programming language in its own right, and quite close to the metal, so it is beyond the scope of this humble blog post to describe how to use it.&lt;/p&gt;

&lt;h5&gt;Passing parameters to the shader&lt;/h5&gt;

&lt;p&gt;While shaders can be interesting in their own right, they are much more flexible when you can pass in parameters to affect the transformations that take place. You specify these in the &lt;code&gt;custom()&lt;/code&gt; function, or the &lt;code&gt;params&lt;/code&gt; attribute of the feCustom element if using the SVG version. This takes in space separated key value pair. The first is the name of the parameter (this will be defined in the shader) and the second is the value you are passing to it. This can either be &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;, a number (as used in the example above), an array (&lt;code&gt;array( ‘&lt;number&gt;[wsp&lt;number&gt;]*’)&lt;/number&gt;&lt;/number&gt;&lt;/code&gt;), a transform (either a CSS 3D transform or a matrix), or a texture (&lt;code&gt;texture(&lt;uri&gt;)&lt;/uri&gt;&lt;/code&gt;). With texture you can pass it the result of a previous filter or shader using the &lt;code&gt;result()&lt;/code&gt; function. You pass it the name specified in the result attribute of the filter in question.&lt;/p&gt;

&lt;p&gt;Here is an example defining the filter, then a shader with a vertex mesh and a number of parameters:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
filter: grayscale(0.5) custom(url('groovy.vs'), 5 4, awesome false, randomness 15, stuff array(1 23 43 32));
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;This will apply a grayscale filter. The texture which is outputted from this passed to the groovy vertex shader. This will create a vertex map of 6 lines (7 vertices) and 5 columns (6 vertices) attached to the filter box. It will then pass in the three parameters, do whatever the vertex filter defines to manipulate the texture then will output the result and rasterise it.&lt;/p&gt;

&lt;h5&gt;Defining the filter margins&lt;/h5&gt;

&lt;p&gt;There are filter margins outside the border box to give space for the various transformations. These can be set with 5 new CSS properties: &lt;code&gt;filter-margin-top&lt;/code&gt;, &lt;code&gt;filter-margin-bottom&lt;/code&gt;, &lt;code&gt;filter-margin-left&lt;/code&gt;, and &lt;code&gt;filter-margin-right&lt;/code&gt; work the same way as the the equivalent margin properties. The &lt;code&gt;filter-margin&lt;/code&gt; property is the shorthand that works the same way as the &lt;code&gt;margin&lt;/code&gt; property. If you are using the SVG syntax you can use the &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;attributes&lt;/code&gt; on the &lt;code&gt;filter&lt;/code&gt; element instead. If both are defined then the SVG attributes takes precedence.&lt;/p&gt;

&lt;h4&gt;Relation to other specifications&lt;/h4&gt;

&lt;p&gt;The CSS shaders spec relates most closely to the Filters 1.0 and WebGL specs. As explained earlier, the shaders spec uses the &lt;code&gt;custom&lt;/code&gt; function from Filters 1.0. Fragment shaders are similar to filters, but allow you to define your own from scratch, rather than just being able to use the predefined filters in Filters 1.0.&lt;/p&gt;

&lt;p&gt;WebGL is a web-based version of the  OpenGL ES 2.0 specification. It is a powerful low level 3D graphics language, which provides a 3D context to the canvas element. It provides both fragment and vertex shaders using the same GLSL ES Shader language, plus all the other 3D features. The use cases are quite different as WebGL works on content in the canvas element while CSS Shaders works on any HTML or SVG content. WebGL is a 3D drawing API similar to 2D canvas, while HTML and SVG is retained mode, using the DOM.&lt;/p&gt;

&lt;p&gt;The same trade offs, advantages and use cases with SVG Vs Canvas are likely with CSS shaders + HTML/SVG Vs WebGL. You&amp;#8217;re likely to use WebGL if you want highly interactive 3D games where you don&amp;#8217;t care about keeping access to what was rendered on screen and you&amp;#8217;re making 3D models, while you&amp;#8217;re more likely to use HTML/SVG + CSS shaders if you want to retain the DOM, such as keeping textual content as actual text, and just want to add some visual effects.&lt;/p&gt;

&lt;p&gt;The shaders spec is also defined to work with CSS transitions and Animations. The &lt;code&gt;filter&lt;/code&gt; property is specified to be animatable. For interpolation to happen the filter values have to have the same number of filter functions and appear in the same order .&lt;/p&gt;</description><link>http://generatedcontent.org/post/11059109286</link><guid>http://generatedcontent.org/post/11059109286</guid><pubDate>Wed, 05 Oct 2011 06:01:00 -0700</pubDate><category>CSS</category><category>shaders</category><category>SVG</category><category>3d</category><category>graphics</category></item><item><title>What’s slated for CSS4 Selectors?</title><description>&lt;p&gt;The CSS Working Group recently &lt;a href="http://www.w3.org/News/2011#entry-9219" target="_blank"&gt;published the first working draft&lt;/a&gt; of CSS4 Selectors. “Wait…CSS 4? I thought CSS3 was still incomplete” you might ask. The spec process changed after CSS2.1. Instead of one monolithic spec, CSS3 was broken down into smaller bite sized chunks. Each chunk or module graduate to the Recommendation stage independently when they’re ready. As each module doesn’t depend on each other (typically. Some related modules might have dependancies, such as CSS3 Selectors on CSS Namespaces) work can start on the next level of the module–if there is demand for a new version–after the current level reaches REC. Therefor work on CSS4 specs will go on in parallel with CSS3 modules. The selectors specification is one such module where there is demand for some new features .&lt;/p&gt;

&lt;h4&gt;Introducing Selectors level 4&lt;/h4&gt;

&lt;p&gt;The &lt;a href="http://www.w3.org/TR/selectors4/" target="_blank"&gt;CSS4 Selectors spec&lt;/a&gt; has already seen a large number of revisions since level 3. As it is still the first draft of the spec, it will likely change in numerous ways before it becomes a recommendation itself and there are browser implementations. Lets have a quick dig into the draft and see what has changed.&lt;/p&gt;

&lt;h5&gt;Moving homes. In-N-Out the spec&lt;/h5&gt;

&lt;p&gt;There are some selectors that were moved into CSS4 Selectors from other specs, and some that were removed and are looking for a new home:&lt;/p&gt;

&lt;h6&gt;Pseudo-elements&lt;/h6&gt;

&lt;p&gt;One of the first things you may notice about the spec is that pseudo-elements are gone from the spec. Don’t worry though, they will find a new home in a different spec in the future. I’m not sure if this will be its own spec or merged into another one. I wonder if this is to prepare for styling the &lt;a href="http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/" target="_blank"&gt;Shadow DOM&lt;/a&gt;.&lt;/p&gt;

&lt;h6&gt;UI state pseudo-classes&lt;/h6&gt;

&lt;p&gt;While pseudo-elements were moved out, the &lt;a href="http://www.w3.org/TR/css3-ui/#pseudo-classes" target="_blank"&gt;user interface state pseudo-classes&lt;/a&gt; from CSS3 Basic User Interface have been moved into the spec. These target various states that UI components can be in, such as if checkbox is checked or unchecked or if a value is required or not. They were mapped to XForms states in CSS3 UI, but they are in general language agnostic. They’re perfect for styling HTML5 Form elements. I assume they were moved to put all the selectors in one place except pseudo-elements. Makes sense to me.&lt;/p&gt;

&lt;h6&gt;Contextual reference element pseudo-class&lt;/h6&gt;

&lt;p&gt;What a mouthful. This is the &lt;a href="http://www.w3.org/TR/selectors4/#scope-pseudo" target="_blank"&gt;&lt;code&gt;:scope&lt;/code&gt; pseudo-class&lt;/a&gt;. You might not have heard of this, but it comes from &lt;a href="http://www.w3.org/TR/selectors-api2/#the-scope-pseudo-class" target="_blank"&gt;Selectors API Level 2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you don’t understand what the &lt;code&gt;:scope&lt;/code&gt; pseudo-class does then don’t worry. It is quite difficult to understand from the spec, and I had to ask the Lachlan Hunt myself. As far as I understand it, the &lt;code&gt;:scope&lt;/code&gt; pseudo-class acts as a placeholder in the selector list. It is replaced by a specified reference element. In the case of Selectors API 2, the element can be specified as an argument in the &lt;code&gt;querySelector&lt;/code&gt;, &lt;code&gt;querySelectorAll&lt;/code&gt; and &lt;code&gt;matchesSelector&lt;/code&gt; methods. This is much easier to understand if I show it in an example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
    var el = document.querySelector("#foo"); // returns first element with ID of foo
    var bar = document.querySelector(":scope &amp;gt; p", el); // returns equivalent of "#foo &amp;gt; p"
&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;In the above example, &amp;#8220;:scope &amp;gt; p&amp;#8221; and &amp;#8220;#foo &amp;gt; p&amp;#8221; are not 100% equivalent. The later will return the first p element that is a child of an element with ID of &amp;#8220;foo&amp;#8221;.  With the former, instead of any #foo, it will only use the first #foo in the document. As multiple IDs are illegal the difference in this particular example will not show off too often, but as you can imagine, the difference is important when using a reference element can appear multiple times in the document.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;:scope&lt;/code&gt; selector is most useful when reference elements are generated programatically, so it is not possible to write a static selector string. The selector is not currently implemented in any browser.&lt;/p&gt;

&lt;h5&gt;Changes to existing selectors&lt;/h5&gt;

&lt;p&gt;In CSS3 selectors, the negation selector (&lt;code&gt;:not&lt;/code&gt;) can &lt;em&gt;only&lt;/em&gt; accept a &lt;a href="http://www.w3.org/TR/css3-selectors/#simple-selectors" target="_blank"&gt;simple selector&lt;/a&gt;. A simple selector is either a type selector (an element name such as &lt;code&gt;p&lt;/code&gt; or &lt;code&gt;em&lt;/code&gt;), universal selector (the &lt;code&gt;&lt;/code&gt; selector), attribute selector (those that target attributes such as [att], [att=val], etc.), class selector, ID selector, or a pseudo-class selector. Pseudo-elements and combinators (e.g. &lt;code&gt;ul li&lt;/code&gt;, &lt;code&gt;ul &amp;gt;li&lt;/code&gt; etc.) are not supported, and the negation selector can not be nested. These restrictions have been relaxed somewhat in &lt;a href="http://www.w3.org/TR/2011/WD-selectors4-20110929/#negation" target="_blank"&gt;CSS4 Selectors&lt;/a&gt; to also allow a selector list. Both simple and compound selectors are allowed. Pseudo-elements and nested selectors are still not supported however.&lt;/p&gt;

&lt;h5&gt;New proposals&lt;/h5&gt;

&lt;p&gt;There are quite a few new selectors that have been proposed in the new spec, including one that has been much demanded by web developers.&lt;/p&gt;

&lt;h6&gt;Matches-Any Pseudo-class&lt;/h6&gt;

&lt;p&gt;The &lt;a href="http://dev.w3.org/csswg/selectors4/#matches" target="_blank"&gt;&lt;code&gt;:matches()&lt;/code&gt;&lt;/a&gt; pseudo-class is the standardised version of Mozilla’s &lt;a href="https://developer.mozilla.org/en/CSS/%3A-moz-any" target="_blank"&gt;&lt;code&gt;:-moz-any()&lt;/code&gt;&lt;/a&gt; pseudo class. This is useful for when you need a number of similar selector strings, but change one part such as the pseudo-classes. Instead of writing &lt;code&gt;li a:link, li a:hover, li a:visited, li a:focus&lt;/code&gt;, you can write &lt;code&gt;li a:matches(:link, :hover, :visited)&lt;/code&gt;. Only simple or compound selectors are allowed. Complex selectors, nesting and using within &lt;code&gt;:not()&lt;/code&gt;is forbidden.&lt;/p&gt;

&lt;h6&gt;Directionality pseudo-class&lt;/h6&gt;

&lt;p&gt;The &lt;a href="http://dev.w3.org/csswg/selectors4/#dir-pseudo" target="_blank"&gt;&lt;code&gt;dir()&lt;/code&gt;&lt;/a&gt; pseudo-class selects elements depending on its directionality. This is commonly the direction of any potential text in the element, set with the HTML &lt;code&gt;dir&lt;/code&gt; attribute. Note that the &lt;code&gt;dir&lt;/code&gt; attribute does not need to be set directly on the element. It could be inherited from its parent. It does not match based on the CSS &lt;code&gt;direction&lt;/code&gt; property.&lt;/p&gt;

&lt;p&gt;The currently defined values are &lt;code&gt;rtl&lt;/code&gt; (right to left, e.g. used with Hebrew or Arabic text) and &lt;code&gt;ltr&lt;/code&gt; (left to right, e.g. used with latin text). Other values are not invalid, but are not defined to do anything. This allows the spec to be extended if new values are needed (top to bottom for example?).&lt;/p&gt;

&lt;h6&gt;Hyperlink pseudo-class&lt;/h6&gt;

&lt;p&gt;The &lt;a href="http://dev.w3.org/csswg/selectors4/#any-link-pseudo" target="_blank"&gt;&lt;code&gt;any-link()&lt;/code&gt;&lt;/a&gt; pseudo-class matches links, no matter if their history state is unvisited (&lt;code&gt;:link&lt;/code&gt;) or visited. This is needed because once a link is visited the regular &lt;code&gt;:link&lt;/code&gt; pseudo-claass does not apply any longer. This saves you having to specify both when you want to style both states the same way. The name is not set in stone, so if you have a better suggestion then get in touch with the working group.&lt;/p&gt;

&lt;h6&gt;Local link pseudo-class&lt;/h6&gt;

&lt;p&gt;The &lt;a href="http://dev.w3.org/csswg/selectors4/#local-pseudo" target="_blank"&gt;&lt;code&gt;:local-link&lt;/code&gt;&lt;/a&gt; pseudo-class selects elements whose links are local links. If you use the plain &lt;code&gt;:local-link&lt;/code&gt; pseudo-class, without parenthesis, then it matches elements that link to the current page. That is exactly the same URL as the document, sans any fragment identifier. Parenthesis can be added, taking a digit as a value. Using &lt;var&gt;0&lt;/var&gt; (&lt;code&gt;a:local-link(0)&lt;/code&gt;) will match a link that is the same domain. A value of &lt;var&gt;1&lt;/var&gt; matches the domain and the first path segment. A value of &lt;var&gt;2&lt;/var&gt; matches the domain and the first two path segments, and so on. For example, if the URL of the document is &lt;q&gt;&lt;a href="http://www.example.com/foo/bar/baz" target="_blank"&gt;http://www.example.com/foo/bar/baz&lt;/a&gt;&lt;/q&gt;, the &lt;code&gt;a:local-link(1)&lt;/code&gt; would match &lt;code&gt;a&lt;/code&gt; elements with links that matches &lt;q&gt;&lt;a href="http://www.example.com/foo" target="_blank"&gt;http://www.example.com/foo&lt;/a&gt;&lt;/q&gt;, while &lt;code&gt;a:local-link(2)&lt;/code&gt; would match &lt;code&gt;a&lt;/code&gt; elements with links that matches &lt;q&gt;&lt;a href="http://www.example.com/foo/bar" target="_blank"&gt;http://www.example.com/foo/bar&lt;/a&gt;&lt;/q&gt;.&lt;/p&gt;

&lt;h6&gt;Time-dimensional pseudo-classes&lt;/h6&gt;

&lt;p&gt;There are three &lt;a href="http://dev.w3.org/csswg/selectors4/#time-pseudos" target="_blank"&gt;time-dimensional&lt;/a&gt; pseudo-classes: &lt;code&gt;:past&lt;/code&gt;, &lt;code&gt;:current&lt;/code&gt;, and &lt;code&gt;:future&lt;/code&gt;. These relate to time related rendering (or time-dimensional canvas as the spec says), such as speech rendering of HTML documents (text to speech). The &lt;code&gt;:current&lt;/code&gt; pseudo-class matches the element that is currently being rendered (such as styling the image that is currently being spoken). The &lt;code&gt;:past&lt;/code&gt; pseudo-class styles matches elements that were rendered in the past (e.g have already been spoken), and &lt;code&gt;:future&lt;/code&gt; matches elements that will be rendered in the future (will be spoken). There is also a version of &lt;code&gt;:current&lt;/code&gt; that takes arguments in parenthesis. This works in much the same way as the &lt;code&gt;:matches()&lt;/code&gt; pseudo-class, where it matches any of the comma separated selector compound selector strings. I am not 100% if I got this one right, as I am not familiar enough with time-dimensional canvas.&lt;/p&gt;

&lt;h6&gt;New tree-structural pseudo-classes&lt;/h6&gt;

&lt;p&gt;There are two new tree-structual pseudo-classes: &lt;a href="http://dev.w3.org/csswg/selectors4/#nth-match" target="_blank"&gt;&lt;code&gt;nth-match&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://dev.w3.org/csswg/selectors4/#nth-last-match" target="_blank"&gt;&lt;code&gt;nth-last-match&lt;/code&gt;&lt;/a&gt;. These work much the same way as &lt;code&gt;nth-child&lt;/code&gt; and &lt;code&gt;nth-last-child&lt;/code&gt;, using the same &lt;var&gt;an+b&lt;/var&gt; notation. However you also include the &lt;code&gt;of&lt;/code&gt; keyword and a selector string that is used to match a subset of the results. This is difficult to understand when reading the spec, but an example makes it clearer. If you have the selector &lt;code&gt;button:nth-match(even of .active)&lt;/code&gt;, instead of selecting all even button elements as with &lt;code&gt;button:nth-child(even)&lt;/code&gt;, it will first match the subset of elements with a class of active, then match the even elements from that subset.&lt;/p&gt;

&lt;h6&gt;Grid-structure pseudo-classes&lt;/h6&gt;

&lt;p&gt;There are three &lt;a href="http://dev.w3.org/csswg/selectors4/#table-pseudos" target="_blank"&gt;grid-structure&lt;/a&gt; pseudo-classes: &lt;code&gt;:column()&lt;/code&gt;, &lt;code&gt;:nth-column()&lt;/code&gt;, and &lt;code&gt;:nth-last-column&lt;/code&gt;. In HTML individual cells of tables are marked up in rows (using the &lt;code&gt;tr&lt;/code&gt; element). The column the cell belongs to is implied rather than than the cell being a child of the &lt;code&gt;col&lt;/code&gt; element. Due to this one dimensional hierarchy, to style individual table cells based on the column it belongs to, we need the &lt;code&gt;:column()&lt;/code&gt; selector. It accepts a list of one or more selectors. Based on the semantics of the language, it calculates if the cells belong in the columns that match the selector list. For example &lt;code&gt;:column(col.total)&lt;/code&gt; selects all the &lt;code&gt;td&lt;/code&gt; cells in the total column.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;nth-column()&lt;/code&gt; and &lt;code&gt;nth-last-column&lt;/code&gt; accept an+b notation as their argument, in the same way as other similar pseudo-classes. For example, &lt;code&gt;:nth-column(odd)&lt;/code&gt; would select all table cells in odd columns.&lt;/p&gt;

&lt;h6&gt;Reference combinators&lt;/h6&gt;

&lt;p&gt;&lt;a href="http://dev.w3.org/csswg/selectors4/#idref-combinators" target="_blank"&gt;Reference combinators&lt;/a&gt; allow you to select elements that are referenced by ID by another element. One of the most common occurrences of this is when a &lt;code&gt;label&lt;/code&gt; references the ID of its related control in the &lt;code&gt;for&lt;/code&gt; attribute. You define a reference combinator by surrounding the attribute with forward slashes (/). For example, if you wanted to style an &lt;code&gt;input&lt;/code&gt; element when you hover over its label, you could use the selector &lt;code&gt;label:hover /for/ input&lt;/code&gt; (providing the label has a &lt;code&gt;for&lt;/code&gt; attribute with the correct ID).&lt;/p&gt;

&lt;h6&gt;The mythical unicorn: parent selector&lt;/h6&gt;

&lt;p&gt;That most demanded of selectors is now in the spec. Well not quite. It isn’t &lt;em&gt;just&lt;/em&gt; a parent selector. You can now select which element is the &lt;a href="http://dev.w3.org/csswg/selectors4/#subject" target="_blank"&gt;subject of the selector&lt;/a&gt;. Traditionally this is the right most compound selector in the selector string. This is currently defined with the dollar sign ($), but there is currently some debate on the mailing list, and will likely change. The compound selector that is marked as the subject is the one that will be styled by the CSS rule. If you have a selector such as &lt;code&gt;ul li.selected&lt;/code&gt;, it will match an element that is of type &lt;code&gt;li&lt;/code&gt; that is a decedent of a &lt;code&gt;ul&lt;/code&gt; element. However, if you want to only style a &lt;code&gt;ul&lt;/code&gt; if one of its &lt;code&gt;li&lt;/code&gt; elements has a class of selected, you need to make the &lt;code&gt;ul&lt;/code&gt; the subject of the selector like so: &lt;code&gt;$ul li.selected&lt;/code&gt;. Now all your prayed are answered!&lt;/p&gt;

&lt;p&gt;This is the current state of play with the first CSS4 Selectors draft. Anything can and will change as the spec progresses. There are very little in the way of implementations of these features, so I can’t check if I understood them all 100% correctly. If I didn’t then let me know and I’ll update the post.&lt;/p&gt;</description><link>http://generatedcontent.org/post/10865123182</link><guid>http://generatedcontent.org/post/10865123182</guid><pubDate>Fri, 30 Sep 2011 16:31:46 -0700</pubDate><category>CSS</category><category>css4</category><category>selectors</category><category>w3c</category></item><item><title>The makeup of the Open Web stack</title><description>&lt;p&gt;The Open Web has never had as many capabilities as it has today. We’re seeing an explosion in new or updated specifications, and prototype and stable implementations to go with them. This blog post will look back as the platform we have had available (Called Open Web 0 here) and then looks forward at what we are beginning to get now and into the short and medium term future (which I’ve labelled Open Web 1).&lt;/p&gt;

&lt;h4 id="ow0"&gt;Open Web 0: The AJAX age&lt;/h4&gt;

&lt;p&gt;I&amp;#8217;m informally calling this the Open Web 0, also known as Web 2.0 and AJAX. This is when the Web started to bloom as an application platform. JavaScript and DOM Scripting was suddenly taken seriously, and XHR liberated us. We could now pull in data from the server without those pesky full page reloads. Applications on the Web, through a web browser, blossomed. I call this Open Web 0 as all modern browsers today support the technology stack (although not always 100%) of this era. Of course, during the golden age of AJAX the support was lopsided, and IE needed special code paths, but this is by and large not needed for modern day IE.&lt;/p&gt;

&lt;h5 id="ow0stack"&gt;The Open Web 0 stack&lt;/h5&gt;

&lt;p&gt;The stack of this era largely centred around HTML4 and XHTML. CSS2.1 was still being worked on, but was largely usable cross browser (except IE vintage of that era). On the scripting side ES3 was top dog, aided and abetted by XHR and DOM 2 (again with shims for IE). These were the days when we were living in the shadows of the first browser wars. IE had been laying dormant, fattened and inactive after all the market share it had drank up. Jerked  awake from their slumber by the XHR powered AJAX revolution–a technology they created no less–the IE team was reformed and they started to play catch up and implemented the parts of the stack that they lacked.&lt;/p&gt;

&lt;p&gt;The Open Web 0 stack roughly consists of:&lt;/p&gt;

&lt;h6&gt;Markup&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/html401/" target="_blank"&gt;HTML 4.01&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/xhtml1/" target="_blank"&gt;XHTML 1.0&lt;/a&gt; and &lt;a href="http://www.w3.org/TR/xhtml11/" target="_blank"&gt;1.1&lt;/a&gt; (the same except spec modularisation and the largely unimplemented Ruby Module)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Semantics could be added to HTML or XHTML using existing attributes with &lt;a href="http://microformats.org/" target="_blank"&gt;Microformats&lt;/a&gt;.&lt;/p&gt;

&lt;h6&gt;Styling&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/CSS2/" target="_blank"&gt;CSS 2.1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Behaviour: ECMAScript, the DOM and APIs&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf" target="_blank"&gt;ES3&lt;/a&gt; (PDF link). Commonly known as JavaScript&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-Core/" target="_blank"&gt;DOM 2 Core&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-HTML/" target="_blank"&gt;DOM 2 HTML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-Views/" target="_blank"&gt;DOM 2 Views&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-Style/" target="_blank"&gt;DOM 2 Style&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-Events/" target="_blank"&gt;DOM 2 Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range/" target="_blank"&gt;DOM 2 Range &amp;amp; Traversal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/XMLHttpRequest/" target="_blank"&gt;XHR 1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Graphics and Images&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVG/" target="_blank"&gt;SVG 1.1&lt;/a&gt; (largely unused due to lack of IE support at the time)&lt;/li&gt;
&lt;li&gt;PNG, JPEG, GIF, etc.&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Video and Audio&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;No native support. Plug-ins such as Flash provided this capability&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Fonts&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;Only installed system fonts&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Other&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/xslt" target="_blank"&gt;XSLT 1&lt;/a&gt; and other XML friends&lt;/li&gt;
&lt;/ul&gt;&lt;h4 id="ow1"&gt;Open Web 1: the HTML5 application age&lt;/h4&gt;

&lt;p&gt;We’re now moving into a new age. That of HTML5. The Web is truly becoming an application platform. Apps on the Web are becoming richer thanks to new APIs, there are efforts to make installable apps through the Widgets initiative, and platforms such as webOS, Windows 8 and the BlackBerry Playbook’s QNX based OS either use Open Web technologies as the way to write apps or one of a number of options.&lt;/p&gt;

&lt;p&gt;Flash was used to prop up the deficiencies of the Open Web in the past. It became the solution for video, and as a shim for supporting new fonts and cut and paste. It had capabilities the web didn&amp;#8217;t have such as microphone and web cam access. We’re not quite there yet, as we’ve not fully arrived in the application age. We’re in the middle of that particular path, but Flash is well on the way to being supplanted by the Open Web. Flash will put up a good fight, and HTML owes a debt of gratitude to it for the inspiration, help and challenge it has provided, but the Web will win. All the momentum is currently on its side. Even Microsoft is playing along. Who would have thought that 6 years ago?&lt;/p&gt;

&lt;h5 id="ow1stack"&gt;The Open Web 1 stack&lt;/h5&gt;

&lt;p&gt;The star of this particular show is HTML5. It swept XHTML and XML to one side and became the media darling. Like many things that crave the limelight, it has stolen credit for things it doesn&amp;#8217;t do (No CSS and Geolocation are &lt;em&gt;not&lt;/em&gt; part of HTML5). But it plays its role of front man and poster boy well. Even the men in suits talk about it, even if they have no idea what it actually is. Much of the real power of HTML5 comes from its associated APIs. These give it the ability to do things that real applications do, such as access client side storage, multi processes, graphics APIs, web cam and GPS access and so on.&lt;/p&gt;

&lt;p&gt;It is not clear what technologies should be included in the stack as many are still under active development. I’m including specs that are either stable and have implementations, or where there is no previous spec in its area but there is significant vendor interest in implementing in the near future. Some will fall by the way side or be replaced by competing specs. Some will be be replaced with newer versions of the same spec. Some of these might not arrive until the next generation.&lt;/p&gt;

&lt;h6&gt;Markup and Semantics&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://dev.w3.org/html5/spec/Overview.html" target="_blank"&gt;HTML5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/wai-aria/" target="_blank"&gt;ARIA 1&lt;/a&gt; (Accessibility)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/md/Overview.html" target="_blank"&gt;MicroData&lt;/a&gt; (Semantics. See also &lt;a href="http://www.w3.org/TR/xhtml-rdfa-primer/" target="_blank"&gt;RDFa&lt;/a&gt; for a rival that fills the same space, and Microformats.)&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Styling&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/CSS2/" target="_blank"&gt;CSS 2.1&lt;/a&gt; (for parts of the spec not supplanted by a CSS3 module)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-selectors/" target="_blank"&gt;CSS3 Selectors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-color/" target="_blank"&gt;CSS3 Color&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-background/" target="_blank"&gt;CSS3 Backgrounds &amp;amp; Borders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-multicol/" target="_blank"&gt;CSS3 Multi-Column Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-grid-align/" target="_blank"&gt;CSS3 Grid Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-flexbox/" target="_blank"&gt;CSS3 Flexible Box Layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-regions/" target="_blank"&gt;CSS3 Regions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-exclusions/" target="_blank"&gt;CSS3 Exclusions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-mediaqueries/" target="_blank"&gt;CSS3 Media Queries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/view-mode/" target="_blank"&gt;view-mode Media Feature&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-conditional/" target="_blank"&gt;CSS3 Conditional Rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css-device-adapt/" target="_blank"&gt;CSS3 Device Adaptation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-values/" target="_blank"&gt;CSS3 Values &amp;amp; Units&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-images/" target="_blank"&gt;CSS3 Image Values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-text/" target="_blank"&gt;CSS3 Text&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/css3-fonts/" target="_blank"&gt;CSS3 Fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-ui/" target="_blank"&gt;CSS3 Basic UI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-2d-transforms/" target="_blank"&gt;CSS3&amp;#160;2D Transforms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-3d-transforms/" target="_blank"&gt;CSS3&amp;#160;3D Transforms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-transitions/" target="_blank"&gt;CSS3 Transitions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-animations/" target="_blank"&gt;CSS3 Animations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css3-namespace/" target="_blank"&gt;CSS Namespaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/css-style-attr/" target="_blank"&gt;CSS Style Attribute&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Behaviour: ECMAScript, the DOM and APIs&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" target="_blank"&gt;ES5&lt;/a&gt; (the ES6 spec is now in development)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html" target="_blank"&gt;DOM4&lt;/a&gt; (Replaces DOM2 Traversal and Range, DOM3 Core, parts of DOM3 Events, and Element Traversal specs and moves DOM APIs from HTML5)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/csswg/cssom/" target="_blank"&gt;CSSOM&lt;/a&gt; (Replaces DOM2 Style)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html" target="_blank"&gt;DOM3 Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/progress/" target="_blank"&gt;Progress Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/geo/api/spec-source-orientation.html" target="_blank"&gt;DeviceOrientation Event&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/webevents/raw-file/default/touchevents.html" target="_blank"&gt;Touch Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/webevents/raw-file/tip/gamepad.html" target="_blank"&gt;Gamepad&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/eventsource/" target="_blank"&gt;Server-Sent Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/" target="_blank"&gt;XHR 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/selectors-api2/" target="_blank"&gt;Selectors API 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/workers/" target="_blank"&gt;Web Workers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/webstorage/" target="_blank"&gt;Web Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html" target="_blank"&gt;Indexed DB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/postmsg/" target="_blank"&gt;Web Messaging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/html5/websockets/" target="_blank"&gt;Web Sockets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/WebNotifications/%20" target="_blank"&gt;Web Notifications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/webapi/FileAPI/" target="_blank"&gt;File API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/file-system/file-writer.html" target="_blank"&gt;File API Writer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/file-system/file-dir-sys.html" target="_blank"&gt;File API Directories &amp;amp; Systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html" target="_blank"&gt;HTML Editing APIs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Performance APIs&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html" target="_blank"&gt;Navigation Timing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://w3c-test.org/webperf/specs/PerformanceTimeline/" target="_blank"&gt;Performance Timeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://w3c-test.org/webperf/specs/ResourceTiming/" target="_blank"&gt;Resource Timing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://w3c-test.org/webperf/specs/UserTiming/" target="_blank"&gt;User Timing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://w3c-test.org/webperf/specs/PageVisibility/" target="_blank"&gt;Page Visibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/animation-timing/%20" target="_blank"&gt;Animation Timing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html" target="_blank"&gt;Efficient Script Yielding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Device and System APIs&lt;/h6&gt;

&lt;p&gt;Apart from Geolocation it is not clear whether there will be vendor support for the various W3C device related APIs. We will have to wait and see what gets included in browsers and what doesn&amp;#8217;t. Or if we have to wait for the next generation.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/geolocation-API/" target="_blank"&gt;Geolocation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/contacts/" target="_blank"&gt;Contacts API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/calendar/" target="_blank"&gt;Calendar API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/system-info/" target="_blank"&gt;System Information&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/system-info/battery-status.html" target="_blank"&gt;Battery Status Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/netinfo/%20" target="_blank"&gt;Network Information API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/camera/" target="_blank"&gt;Media Capture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2009/dap/messaging/" target="_blank"&gt;Messaging API&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Installable Web Application&lt;/h6&gt;

&lt;p&gt;Aside from Opera, it isn’t clear if the Widget family of specifications will be adopted by desktop web browsers. There has been some interest  on mobile platforms however.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://dev.w3.org/2006/waf/widgets/" target="_blank"&gt;Widgets Packaging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/waf/widgets-api/" target="_blank"&gt;Widgets Interface&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/waf/widgets-access/" target="_blank"&gt;Widget Access Request&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/widgets-uri/" target="_blank"&gt;Widget URIs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/waf/widgets-updates/" target="_blank"&gt;Widget Updates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2006/waf/widgets-digsig/%20" target="_blank"&gt;XML Digital Signatures&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Graphics, Images and Effects&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://dev.w3.org/html5/2dcontext/" target="_blank"&gt;HTML Canvas 2D&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.khronos.org/registry/webgl/specs/1.0/" target="_blank"&gt;WebGL 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVG/" target="_blank"&gt;SVG 1.1&lt;/a&gt; (for parts not superseded by SVG 1.2 modules)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVGTiny12/" target="_blank"&gt;SVG 1.2 Tiny&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVGCompositing/" target="_blank"&gt;SVG Compositing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVGColor12/" target="_blank"&gt;SVG 1.2 Color&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVGParam/" target="_blank"&gt;SVG Parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/SVG-Transforms/%20" target="_blank"&gt;SVG Transforms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html" target="_blank"&gt;Filter Effects 1&lt;/a&gt; (Replaces SVG 1.2 Filters. Also applies to HTML/CSS)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html" target="_blank"&gt;CSS Shaders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.w3.org/TR/PNG/" target="_blank"&gt;PNG&lt;/a&gt;,  JPEG, GIF, etc.&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Video and Audio&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;code&gt;video&lt;/code&gt; and &lt;code&gt;audio&lt;/code&gt; elements in HTML5. Nearest we have to a royalty free codecs at the moment is VP8 for video and OGG Vorbis for audio. Together these make up WebM.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.w3.org/2011/webrtc/editor/webrtc.html" target="_blank"&gt;WebRTC 1&lt;/a&gt; (includes getUserMedia, which is the replacement for the &lt;code&gt;device&lt;/code&gt; element.)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html" target="_blank"&gt;Web Audio API&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Fonts&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/WOFF/" target="_blank"&gt;WOFF 1&lt;/a&gt;, OTF, TTF, SVG Fonts via CSS Web Fonts.&lt;/li&gt;
&lt;/ul&gt;&lt;h6&gt;Other&lt;/h6&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/xslt" target="_blank"&gt;XSLT 1&lt;/a&gt; and other XML friends&lt;/li&gt;
&lt;/ul&gt;&lt;h5 id="next"&gt;What’s Next?&lt;/h5&gt;

&lt;p&gt;Its always hard to predict the next era of the Web. Especially when we don’t even fully know how this era will pan out yet. We’re living in an era where web technologies are a realistic option for building applications, especially on mobile where there are so many platforms. PhoneGap is one example of a successful project that allows you to write to the web but deploy as native apps. I think the next era will be when the Open Web has shrugged off Flash and has native apps in its sights. Early skirmishes have already started, but the real titanic battle is yet to begin. Once the Open Web has been super charged with the likes of the Shadow DOM and &lt;a href="http://dglazkov.github.com/component-model/" target="_blank"&gt;Component Model&lt;/a&gt;, CSS4, &lt;a href="http://www.khronos.org/webcl/" target="_blank"&gt;WebCL&lt;/a&gt;, and access to the full range of device capabilities and services, then the Web will be able to stand shoulder to shoulder with native apps. With the tools at our disposal we should be able to produce user experiences every bit as beautiful, fast and pleasant to use as its native brethren. And don’t forget the server-side, where JavaScript-based technologies such as &lt;a href="http://nodejs.org/" target="_blank"&gt;Node&lt;/a&gt; are starting to make their presence felt.&lt;/p&gt;</description><link>http://generatedcontent.org/post/10657722675</link><guid>http://generatedcontent.org/post/10657722675</guid><pubDate>Sun, 25 Sep 2011 13:58:00 -0700</pubDate><category>html5</category><category>css3</category><category>javascript</category><category>svg</category><category>canvas</category><category>webgl</category><category>device apis</category><category>open web</category></item><item><title>What’s cooking on the Open Web?</title><description>&lt;p&gt;There is so much movement with existing, new, and experimental specs that it is often difficult to keep up. Lets have a look at some of them that are being implemented in browsers right now or in the very near future.&lt;/p&gt;

&lt;h4&gt;Replacing Mutation Events&lt;/h4&gt;

&lt;p&gt;DOM Mutation Events were deprecated in DOM 3 Events. This was due to a number of known issues that cause real world performance problem. The three main problems include the overhead required by event propagation, the excessive times they need to fire when a DOM mutation happens, and the amount of information that needs to be stored by the event due to needing to store  both the before and after state of the mutation. These issues are summarised on the &lt;a href="http://www.w3.org/2008/webapps/wiki/MutationReplacement#Background" target="_blank"&gt;W3C Webapps wiki&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Due to the issues above it was decided that we need to define a replacement. Developers from both Chromium and Mozilla worked together to produce a proposal. This proposal is called Mutation Observers. The discussion can be followed on the &lt;a href="http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html" target="_blank"&gt;WebApp mailing list&lt;/a&gt;.  This was designed to avoid the pain points of DOM Mutation Events mentioned above. It is a recent proposal so there is no specification yet, but Google are starting to &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=68729" target="_blank"&gt;develop a vendor prefixed implementation&lt;/a&gt; in the very near future.  This is a much needed part of the Open Web platform so it is good to see movement in this space if we are recommended not to use DOM Mutation Events.&lt;/p&gt;

&lt;h4&gt;Filter effects in HTML&lt;/h4&gt;

&lt;p&gt;This is one for those that like eye candy. Many of you will be aware of filters in programs like Photoshop. Examples include saturation, blur, drop shadows, saturation, etc. While these kind of advanced effects have not been possible in CSS, they have been &lt;a href="http://www.w3.org/TR/SVG/filters.html" target="_blank"&gt;available to SVG&lt;/a&gt; for quite some time (Except in Safari where it is switched off, and IE which hasn’t implemented it yet). For example for Opera’s &lt;a href="http://standards-next.org/static/CSS3-NYC09/" target="_blank"&gt;Standards.Next event page&lt;/a&gt; in 2009, I added some blur, lighting, and sepia tone to age the photos using SVG filters.&lt;/p&gt;

&lt;p&gt;CSS has always lacked a way to do this, but now filters will be allowed to apply to HTML content via CSS with the &lt;a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html" target="_blank"&gt;Filter Effects 1&lt;/a&gt; spec. The filters spec is being realigned by both the SVG and CSS working group to apply to both languages. You will be able to apply SVG filters to HTML using the CSS &lt;code&gt;filter&lt;/code&gt; property. As SVG filters can be quite complex to write and understand there will be a number of pre canned shorthands that map directly to a specific SVG filter. This is somewhat similar to how in CSS3 Transitions you can use property values like &lt;code&gt;ease-in&lt;/code&gt; and  &lt;code&gt;linear&lt;/code&gt; in &lt;code&gt;transition-timing-function&lt;/code&gt; rather than writing the corresponding  cubic bezier. The current shorthands include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;grayscale&lt;/li&gt;
&lt;li&gt;sepia&lt;/li&gt;
&lt;li&gt;saturate&lt;/li&gt;
&lt;li&gt;hue-rotate&lt;/li&gt;
&lt;li&gt;invert&lt;/li&gt;
&lt;li&gt;opacity&lt;/li&gt;
&lt;li&gt;gamma&lt;/li&gt;
&lt;li&gt;blur&lt;/li&gt;
&lt;li&gt;sharpen&lt;/li&gt;
&lt;li&gt;drop-shadow&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;There are also others under consideration. This is going to not only allow these filters to work in HTML but also make it easier to do the common filters in SVG too. Expect these filters to be (ab)used all over the web in the coming years. Mozilla’s Robert O&amp;#8217;Callahan originally came up with the &lt;a href="http://robert.ocallahan.org/2008/06/applying-svg-effects-to-html-content_04.html" target="_blank"&gt;original prototype for SVG filters in HTML&lt;/a&gt;, as well as other related concepts such as SVG masks. Now that there is a spec in the works, Apple are &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=68469" target="_blank"&gt;starting to implement&lt;/a&gt; it in WebKit in the near future. This will reuse their existing SVG filters code, so that should hopefully speed up the development work. Filters in HTML has been one of my top pet bugs for a while when I worked at Opera, so hopefully &lt;a href="http://my.opera.com/MacDev_ed/blog/" target="_blank"&gt;Erik&lt;/a&gt; will implement it soon too ;).&lt;/p&gt;

&lt;h4&gt;HTML5(?) Microdata&lt;/h4&gt;

&lt;p&gt;Of the things most hotly contested in HTML5–with the possible exception of &lt;code&gt;longdesc&lt;/code&gt;–the mechanism for adding machine readable semantic metadata to HTML is perhaps the most talked about. Microformats have existed for a number of years now, using existing HMTL attributes. &lt;a href="http://www.w3.org/TR/rdfa-syntax/" target="_blank"&gt;RDFa&lt;/a&gt; looked to formalise this with its own set of attributes and grammar. The WHATWG community were not fans of RDFa and came up with their own approach called &lt;a href="http://dev.w3.org/html5/md/" target="_blank"&gt;Microdata&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is not clear who will win this particular battle yet, but Microdata already has &lt;a href="http://dev.opera.com/articles/view/microdata-and-the-microdata-dom-api/" target="_blank"&gt;one implementation&lt;/a&gt; in the form of Opera. It looks like one could become two as Motorola has just provided a &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=68609" target="_blank"&gt;basic implementation in WebKit&lt;/a&gt;. If it gets accepted in WebKit and is compatible with the Opera implementation then that will give us the two implementations needed for a spec to go to recommendation status.&lt;/p&gt;

&lt;h4&gt;Joystick and Gamepad Events&lt;/h4&gt;

&lt;p&gt;The Open Web is becoming a better gaming platform. Canvas started the craze, but now we also have WebGL (AKA Canvas3D) and Audio APIs. Mozilla believe that the next piece of the puzzle is &lt;a href="https://wiki.mozilla.org/JoystickAPI" target="_blank"&gt;the Joystick API&lt;/a&gt;. This will provide events for joysticks and games pads so that developers can listen for them in much the same way as the mouse or touch.  Mozilla have a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=604039" target="_blank"&gt;prototype of this API&lt;/a&gt; available to try.&lt;/p&gt;

&lt;p&gt;This prototype has evolved into a &lt;a href="http://dvcs.w3.org/hg/webevents/raw-file/tip/gamepad.html" target="_blank"&gt;draft Gamepad spec&lt;/a&gt; produced by Google and Mozilla. This provides a GamepadEvent event and a Gamepad interface, which provides access to information about the buttons and axes of the controller. Shame there is no force feedback ;). Google has now &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=66859" target="_blank"&gt;implemented a prototype in WebKit&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Dashes in canvas&lt;/h4&gt;

&lt;p&gt;Canvas doesn’t support the humble dashed stroke. Well, not in the spec anyway. There was much demand for this feature and thus Mozilla invented their own &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=662038" target="_blank"&gt;mozDash and mozDashOffset&lt;/a&gt;.  Company100 (developers of the Dorothy browser) have implemented this for WebKit under the similarly but differently named &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=63933" target="_blank"&gt;webkitLineDash and webkitLineDashOffset&lt;/a&gt;. This follows the  specified behaviour in SVG for &lt;code&gt;stroke-dasharray&lt;/code&gt; and &lt;code&gt;stroke-dashoffset&lt;/code&gt;, but only supports floating point numbers. As there is no spec yet and it isn&amp;#8217;t even integrated into WebKit then don&amp;#8217;t be surprised if this changes before shipping in a browser.&lt;/p&gt;

&lt;h4&gt;XBL2 is dead. Long live Component Model&lt;/h4&gt;

&lt;p&gt;XBL2 is more or less &lt;a href="http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1568" target="_blank"&gt;formally dead&lt;/a&gt;.  There was an &lt;a href="http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1513.html" target="_blank"&gt;informal meeting&lt;/a&gt; recently in the Bay Area between a number of browser vendors to discuss its replacement; the Component Model. There is no official spec yet, but you can find a lot of information about the goals on the &lt;a href="http://wiki.whatwg.org/wiki/Component_Model" target="_blank"&gt;WHATWG Wiki&lt;/a&gt;. The basic aim is to allow new DOM elements to be created. For example if you would like to create controls for the &lt;code&gt;video&lt;/code&gt; element you can create DOM elements and hide the implementation details from the actual document DOM using on of the building blocks of the Component Model; the &lt;a href="http://wiki.whatwg.org/wiki/Component_Model#Shadow_DOM" target="_blank"&gt;Shadow DOM&lt;/a&gt;. This should allow HMTL to be much more extensible.&lt;/p&gt;

&lt;p&gt;There are no implementations currently, but Google have &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=52962" target="_blank"&gt;started development&lt;/a&gt; on this feature in WebKit. Hopefully we will see the fruits of this labour in the near future.&lt;/p&gt;

&lt;p&gt;This is just a hint of the new toys that are being implemented by browser vendors and we may get to play with in the near future. I’m sure Opera and Microsoft are also cooking up some tasty treats hidden away in their bug tracking systems. Its a good time to be in the web.&lt;/p&gt;</description><link>http://generatedcontent.org/post/10618804508</link><guid>http://generatedcontent.org/post/10618804508</guid><pubDate>Sat, 24 Sep 2011 17:03:00 -0700</pubDate><category>DOM</category><category>HTML5</category><category>CSS3</category><category>SVG</category><category>Events</category><category>Canvas</category><category>Filter</category><category>Microdata</category></item><item><title>Windows 8 on tablets. Genius?</title><description>&lt;p&gt;There has been a lot of debate on sites such as &lt;a href="http://daringfireball.net/" target="_blank"&gt;Daring Fireball&lt;/a&gt; about Microsoft’s strategy of putting Windows 8 on tablets, rather than a version of Windows Phone 7 optimised for tablets. As &lt;a href="http://daringfireball.net/2011/09/metro" target="_blank"&gt;Gruber puts it&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt; I’m hung up on the question of how any OS that lets you do everything Windows does could compete with the iPad, because the iPad’s appeal and success is largely forged by the advantages that come from not allowing you to do so many of the things Mac OS X can do.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;If you haven’t read it yet go ahead. It’s an interesting read. A tablet is a device between a computer and a phone. Apple and Microsoft are approaching it from polar opposite directions. Apple is treating the iPad sort of like an enlarged iPhone, while Microsoft is approaching it sort of like a Macbook Air (or insert your favourite PC ultraportable here) without a keyboard. Where both their strategies converge is that they&amp;#8217;re primarily focusing on the mobile style UI. In Windows 8 the classical UI is still around, but much of the buzz has been around the Metro user experience.&lt;/p&gt;

&lt;p&gt;The thought is that Windows 8 tablets would compete better with the iPad if it ditched the classic underpinnings and went solely with Metro. I think that they did this for one primary reason: developers.&lt;/p&gt;

&lt;p&gt;Windows Phone 7, and Metro in particular, has got even Mac fans like Gruber interested in it. No one can argue it is not innovative and original. Its not just another iOS clone. However, even though pundits and the press talk about it and it has mindshare, it hasn’t (yet at least) made a breakthrough in terms of marketshare or critical user mass. Windows Phone 7 or 8 on tablets would be starting from scratch, without a critical mass of developers behind it. Unless you&amp;#8217;re a huge software house with a lot of resources, it is hard to make the case for making Windows Phone 7 tablet applications. It’s a chicken an egg situation. Developers are more likely to write apps if there are users, and users are more likely to buy into the platform if there are apps available. It would be a big risk for Microsoft, and they’d have to throw a lot of money at it.&lt;/p&gt;

&lt;p&gt;Microsoft always have one ace up its sleeve though. Windows. I would guess that Windows has the biggest developer community in the world (except perhaps the Web). If you can write Windows applications using Metro and associated APIs and it is promoted as the way to make future Windows applications, then overnight you have a huge developer community motivated and ready to write Windows 8 apps. Apps that will just work (in theory) on Windows 8 tablets. Without developers even considering tablets, there will be a critical mass of Metro apps within a relatively short period of time. Add to this that Metro apps can be built with Web technologies, then they could have the two of the biggest developer communities developing for their platform. Granted there are also no users of Windows 8 yet, but history is on its side. Even universally panned versions like Vista sold incredibly well.&lt;/p&gt;

&lt;p&gt;With this strategy Microsoft have had to make compromises as Gruber pointed out. But they may give the platform more chance of success by going with their dominant platform. With enough Metro apps the platform might just stand a chance of getting enough users. If this happens the platform will be a target for developers in its own right (which also may have a knock on effect for Windows Phone). It can then consider dropping the classic Windows experience on tablets and give it the experience that they may have been planning all along. Something more akin to Windows Phone. When Apple switched from OS 9 to OS X they supplied classic for the transition period then removed it. When they switched from PPC to Intel they provided Rosetta, then removed it. Could Microsoft be following a similar strategy?&lt;/p&gt;</description><link>http://generatedcontent.org/post/10414057169</link><guid>http://generatedcontent.org/post/10414057169</guid><pubDate>Mon, 19 Sep 2011 14:02:46 -0700</pubDate><category>Windows 8</category><category>Metro</category><category>tablets</category></item><item><title>Merchant 4 has these quite amazing acacia wood and glass canning...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lrdpi25BbY1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://merchant4.com/" target="_blank"&gt;Merchant 4&lt;/a&gt; has these quite amazing acacia wood and glass canning jars for sale from Thai company Chabatree.&lt;/p&gt;

&lt;p&gt;Also check out these &lt;a href="http://merchant4.com/kitchen/wood-glass-canisters.html" target="_blank"&gt;Wood and glass canisters&lt;/a&gt; from the same company. Merchant 4 has some incredible stuff in their store, but as they’re artisan made many of the things are on the pricer side of the spectrum. You pay for quality though.&lt;/p&gt;</description><link>http://generatedcontent.org/post/10100135860</link><guid>http://generatedcontent.org/post/10100135860</guid><pubDate>Sun, 11 Sep 2011 15:08:00 -0700</pubDate><category>canning jar</category><category>thailand</category><category>wood</category><category>glass</category><category>kitchen</category></item><item><title>The Era of mobile dominance is beginning</title><description>&lt;p&gt;We’re in the middle of a mobile web revolution. However, its not iPhone, smart phones or the west that is leading this revolution. No, if you want to go to the epicentre of where the mobile web is really changing the status quo and leap frogging the incumberants then you have to go to Africa.&lt;/p&gt;

&lt;p&gt;Thousands of miles from the innovation centres of Silicon Valley and the legions of iPhones and Androids, in Africa feature phones are the top dog. But no one surfs on features phones! Wrong. Where in the world are mobile devices creating more page views and unique users than their PC counterpoints? The US? Nope. Japan or South Korea? They&amp;#8217;re well known for their technical prowess and eagerness to embrace a mobile digital lifestyle, but nope and nope. Its Nigeria, and probably with a Nokia.&lt;/p&gt;

&lt;p&gt;It shouldn’t be a surprise. While here in the west an iPhone or iPad is often used a supplementary device for accessing the web, such as when we are out and about or watching the TV. In Africa where money is tighter and broadband infrastructure is more limited, there is often the choice: a phone or a computer. There is no surprise many opt for the former when it has an always on connection, can be with you at all times and, well, doubles as a phone as well. Many people in africa &lt;strong&gt;only&lt;/strong&gt; access the web on a phone. Combine this with &lt;a href="http://www.opera.com/mobile/features/" target="_blank"&gt;Opera Mini&lt;/a&gt; which compresses traffic by up to 90% and you have a viable and affordable way to access the internet, perhaps for the first time.&lt;/p&gt;

&lt;p&gt;The mobile web has been a revelation in the west. It allows us to kill time on the train to work, stops us from getting lost when in a new part of town, chat with friends when in a coffee shop or lets us see a review before deciding to go to see a film or try a new restaurant. However much added convenience this gives us, remember back to when we first got online at all. Millions of people across Africa and the developing world are now accessing free information sources such as Wikipedia for perhaps the first time. They can talk to relatives or friends in other villages and town over Facebook and email. They can do all the things that we now take for granted, that before was only available for the privileged few, or they had to visit and pay at a internet cafe to access. When I climbed Kilimanjaro a number of years ago our younger guide told me he used to visit internet cafe&amp;#8217;s once a week or month to email friends. I wonder if he now is using Facebook on a phone in his own time, even when up the mountain?&lt;/p&gt;

&lt;h4&gt;Beginning of the era of mobile dominance&lt;/h4&gt;

&lt;p&gt;So back to Nigeria. An incredible thing has started to happen. The growth in the mobile web has always been strong there, but after a brief flirtation in April, since the 3rd July people have surfed more on mobile than they do on desktop on almost every Sunday in the month.  Since the 6th August, mobile surfing also took over desktop surfing on Saturdays as well. Now the mobile web traffic has grown enough that since the 30th August (a Tuesday), mobile web is also beating out the desktop web in a number of midweek days too. By October the mobile web will probably be consistently ahead across the whole month. This would make Nigeria the first country for that to happen. Incredibly, &lt;a href="http://www.quirksmode.org/blog/archives/2011/08/q2_2011_mobile.html#more" target="_blank"&gt;Opera Mini is bigger in Nigeria than even Internet Explorer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lrblrzJ6rg1qmllqg.jpg" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-NG-daily-20100904-20110904" target="_blank"&gt;StatCounter Global Stats - Mobile vs. Desktop Market Share&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other countries are not far behind though, and not surprisingly most of these are also in Africa. You can see similar trend start to happen in &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-NE-daily-20100904-20110904" target="_blank"&gt;Niger&lt;/a&gt;, &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-ZW-daily-20100904-20110904" target="_blank"&gt;Zimbabwe&lt;/a&gt;, &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-ET-daily-20100904-20110904" target="_blank"&gt;Ethiopia&lt;/a&gt;, &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-SD-daily-20100904-20110904" target="_blank"&gt;Sudan&lt;/a&gt;, &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-TZ-daily-20100904-20110904" target="_blank"&gt;Tanzania&lt;/a&gt;, and more.&lt;/p&gt;

&lt;h4&gt;Over on the subcontinent&lt;/h4&gt;

&lt;p&gt;It isn’t just Africa though. Over on the subcontinent, India, one of the largest countries on the planet in terms of population and many other metrics is also &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-IN-daily-20100904-20110904" target="_blank"&gt;well on its way&lt;/a&gt; to the mobile market presiding over the desktop market. And yes, they mostly use feature phones such as Nokias as well. If that isn’t enough to make the bean counters sit up and notice that people &lt;em&gt;do&lt;/em&gt; surf on feature phones, the trend is mirrored in neighbour &lt;a href="http://gs.statcounter.com/#mobile_vs_desktop-BD-daily-20100904-20110904" target="_blank"&gt;Bangladesh&lt;/a&gt; (pop. 142.3 million).&lt;/p&gt;

&lt;h4&gt;The revolution has just begun&lt;/h4&gt;

&lt;p&gt;We’re at the very early days of the mobile web surpassing the desktop in terms of usage. Over the next few months and years it will likely spread from just Nigeria to large parts of the developing world. There will be huge opportunities for innovation with new products and services designed to take advantage of these mobile first economies. We’ve already seen the rise of mobile payments and banking in Africa before the rest of the world has caught on. There will likely be many more. Hopefully a number of these innovations and services will come from local companies and entrepreneurs.&lt;/p&gt;

&lt;p&gt;What can you do to take advantage of this revolution? First, don’t listen to those experts that claim the mobile web is only on WebKit and only on iPhone, Android and maybe BlackBerry at a push. People surf with whatever they have, and whatever works for them. Feature phones are a very real part of the mobile web, and &lt;a href="http://gs.statcounter.com/#mobile_browser-ww-daily-20100904-20110904" target="_blank"&gt;they&amp;#8217;re not a minority&lt;/a&gt;, even globally. Opera rules the roost because it took feature phones seriously. You can benefit if you do too.&lt;/p&gt;

&lt;p&gt;How do you deliver everywhere? The Web, of course. Not the Web where you browser sniff and only let in WebKit or worse yet only iPhones, but mobile web sites written in HTML where you let in anyone that cares about your content or service. Sure, give an optimised experience to smartphone browsers if you want, have separate smartphone site or app if you can afford it, but don&amp;#8217;t forget to make sure you gracefully degrade to allow the other browsers to access your content too.&lt;/p&gt;</description><link>http://generatedcontent.org/post/10045571079</link><guid>http://generatedcontent.org/post/10045571079</guid><pubDate>Sat, 10 Sep 2011 12:01:21 -0700</pubDate><category>mobile web</category><category>feature phones</category><category>Africa</category><category>Nigeria</category><category>India</category><category>marketshare</category></item><item><title>Designed by one of my favourite designers, Arne Jacobsen, for...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lr7fm9AGHi1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Designed by one of my favourite designers, &lt;a href="http://www.arne-jacobsen.com/en/arne-jacobsen.aspx" target="_blank"&gt;Arne Jacobsen&lt;/a&gt;, for the SAS Royal Hotel in Copenhagen, this flatware set is a minimalist’s dream come true. It is perhaps best known for its guest appearance as a prop in Stanley Kubrick’s movie 2001, A Space Odyssey.&lt;/p&gt;</description><link>http://generatedcontent.org/post/9955303426</link><guid>http://generatedcontent.org/post/9955303426</guid><pubDate>Thu, 08 Sep 2011 05:49:00 -0700</pubDate><category>Arne Jacobsen</category><category>Danish</category><category>minimalism</category><category>flatware</category></item><item><title>I’m not a fan of street art in general, but I can’t help...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lr66mrbHdK1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I’m not a fan of street art in general, but I can’t help adoring the work of &lt;a href="http://neuzz.blogspot.com/" target="_blank"&gt;Neuzz&lt;/a&gt; (real name Miguel Mejía). Inspiration includes Día de los Muertos (the Day of the Dead), Papel Picado folk art and other things from the rich Mexican culture. Now only if the taggers in Norway could learn to paint like that…&lt;/p&gt;</description><link>http://generatedcontent.org/post/9928602515</link><guid>http://generatedcontent.org/post/9928602515</guid><pubDate>Wed, 07 Sep 2011 13:37:00 -0700</pubDate><category>mexico</category><category>day of the dead</category><category>Papel Picado</category><category>street art</category></item><item><title>A different take along the same lines as the iVictrola I posted...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lr64leGrVI1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;A different take along the same lines as the &lt;a href="http://dstorey.tumblr.com/post/9886927584/the-ivictrola-is-a-non-electric-amplifier-for" target="_blank"&gt;iVictrola&lt;/a&gt; I posted yesterday, the MegaPhone is a powerless amplifier for the iPhone. Designed by Enrico Bosa and Isabella Lovero for &lt;a href="http://enandis.com/" target="_blank"&gt;en&amp;is&lt;/a&gt;, the &lt;a href="http://enandis.com/en/designs/megaphone.html" target="_blank"&gt;MegaPhone&lt;/a&gt; is made out of white ceramic with a wooden base. The base raises the horn off the ground to increase the vibrations and improve the column.&lt;/p&gt;</description><link>http://generatedcontent.org/post/9926968344</link><guid>http://generatedcontent.org/post/9926968344</guid><pubDate>Wed, 07 Sep 2011 12:53:37 -0700</pubDate><category>amplifier</category><category>iphone</category><category>italian</category><category>minimalism</category></item><item><title>The iVictrola is a non-electric amplifier for iDevices. It uses...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lr4aurQQ5i1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;The iVictrola is a non-electric amplifier for iDevices. It uses the natural acoustics of the Magnavox phonograph horn to increase the volume of the inbuilt speaker. This, topped off with the beautiful two piece American walnut base makes this a lust-worthy gadget, even if I don’t own an iPad.&lt;/p&gt;</description><link>http://generatedcontent.org/post/9886927584</link><guid>http://generatedcontent.org/post/9886927584</guid><pubDate>Tue, 06 Sep 2011 13:13:39 -0700</pubDate><category>Magnavox</category><category>amplifier</category></item><item><title>No one does the fusion of art and sport like the Japanese....</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lr49hmntBS1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;No one does the fusion of art and sport like the Japanese. Tomoki Momozono has produced a set of mesmerising photos named the &lt;a href="http://www.behance.net/gallery/ART-OF-SUMO/1926733" target="_blank"&gt;Art of Sumo&lt;/a&gt;.&lt;/p&gt;</description><link>http://generatedcontent.org/post/9885868852</link><guid>http://generatedcontent.org/post/9885868852</guid><pubDate>Tue, 06 Sep 2011 12:44:00 -0700</pubDate><category>sumo</category><category>sport</category><category>japan</category></item><item><title>Yamanaka lacquerware is a traditional craft from Japan. The wood...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lr44ngZkip1r2y4rqo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Yamanaka lacquerware is a &lt;a href="http://tokyotoshi.com/blog_en/archives/74" target="_blank"&gt;traditional craft&lt;/a&gt; from Japan. The wood turning technique is designed to highlight the natural beauty of the wood and can take craftsmen over a year to complete.&lt;/p&gt;
&lt;p&gt;These Karmi tea canisters are designed by Satoshi Yasushima and Tomoko Honda and sold by &lt;a href="http://www.syosenjapan.com/gt-karmi.html" target="_blank"&gt;Syosen Japan&lt;/a&gt;. Unfortunatly, the web site is not as hand crafted as the products – it is all images!&lt;/p&gt;
&lt;p&gt;The canisters come in versions for tea and green tea and three different lacquer colours. They’re incredibly beautiful in their simplicity and enough to make we want to drink tea, or at least store it.&lt;/p&gt;</description><link>http://generatedcontent.org/post/9882670157</link><guid>http://generatedcontent.org/post/9882670157</guid><pubDate>Tue, 06 Sep 2011 10:59:40 -0700</pubDate><category>Tea</category><category>Japan</category><category>lacquerware</category></item></channel></rss>

