On Opera’s Implementation of WebKit Aliases

As I’m sure you’re aware, Opera recently released a preview build of their browser Mobile Emulator which is notable largely because they’ve aliased a group of –webkit– prefixed properties, effectively supporting another vendors supposedly proprietary code in their own.

Let me state upfront that I understand why this decision has been made. I don’t agree with it, but I understand it. Opera have a large worldwide audience in the mobile space — to understand how large, take a look at this graphic showing top mobile browsers worldwide last month (if you’ve ever said ‘no-one uses Opera anyway’, put on a dunce cap; if you’ve recently said ‘Opera are breaking the web, but no-one uses it anyway’, pull your head out of your arse before putting on the dunce cap).

With the rise of iOS and Android and mobile WebKit, a lot of developers who can’t see outside their wealthy Western tech bubble are building sites that are optimised for WebKit and don’t degrade properly or, even worse, use –webkit– prefixed properties to actively exclude other browsers. This has also been raised as an issue by Microsoft and Mozilla, who are trying to make headway in the mobile space, but it’s Opera with their huge worldwide userbase who are bearing the brunt; their millions of users are seeing websites that don’t work, and blaming Opera for the problem.

So my issue is not so much with the fact that Opera have done this, but with the properties they’ve chosen. The properties in question are:

  • –webkit-border-radius
  • –webkit-box-shadow
  • –webkit-linear-gradient
  • –webkit-transform
  • –webkit-transition

Of these, –webkit-transition is obvious; some people have written scripts which use the webkitTransitionEnd event as a dependency, so if Opera want these scripts to work, they have to support it. –webkit-transform is straightforward too; if it’s being used for page animations (like sliding between panels), it also has to be supported. –webkit-linear-gradient I can understand although it’s less convincing; the example they’ve used is where a gradient has been used without provision of a fallback background-color, which is no doubt a problem but one which must affect IE users too, and I can’t say I’ve heard of any widespread reporting of that.

I can’t justify their use of –webkit-box-shadow and –webkit-border-radius. For a start, both have been unprefixed by WebKit for a little while now — nine months in the case of box-shadow, 21 in the case of border-radius — but even presuming a lot of legacy use, neither of these properties introduces critical dependencies; seeing squared corners or no drop shadow can hardly be classed as ‘broken’. I know Christian Heilmann has highlighted a case where –webkit-box-shadow has been used as criteria for testing CSS3 support in browsers, but that can’t be a common case, and would be better served by getting in touch with the site owner and explaining the problem.

Apparently the decisions about which properties to alias were based on frequency of misuse along with some judgement, but I think that not all of these properties have been properly justified for inclusion by the Opera team — certainly in the cases of box-shadow and border-radius. These to me smack of opportunism: ‘we’re going to have to support some properties, so while we’re at it let’s also add a couple of more visibly blingy ones’. If that’s not correct, I’d love to see more examples of lack of rounded corners and shadows being flagged as an issue.

Microsoft have said that they don’t intend to follow Opera’s lead, and Mozilla are yet to declare their intentions (last update was that it’s ‘very likely’ they’ll do the same) but don’t seem to view the problem on the same scale as Opera — remember, though, that the former two are in a very different situation to the latter. I hope that, as has been indicated, this is an event that Opera won’t be repeating in the future, that it’s a one-off solution to a problem that would be better off resolved in a different way.

My position is still that this is a problem largely caused by developers and one that should be resolved by them; it’s as easy as testing your websites in Opera Mobile Emulator or Firefox Mobile for Desktop before releasing them. And if you’re someone who’s criticised Opera for making this move but you haven’t taken the time to update your own websites to make sure they work in Opera, you’re part of the problem.


Two quick ways to a better experience for your visitors

I’ve recently become the owner of an Android tablet (Galaxy Tab 8.9) and having spent some time browsing the web with it I’ve identified a couple of areas where work by us, as developers, can make a real difference.

The first is the easiest: use appropriate HTML5 input elements. It’s quite frustrating typing an email address into a text input field when the @ symbol is on a different interface view to the _ symbol, or when predictive text is enabled, and there’s really no need for it when HTML5 input types are well supported and — crucially — fully backwards compatible. So if you’re asking the user to input an email address, use:

<input type="email">

The same goes for other form fields.

The second area for improvement is slightly more complex: stop browser sniffing if you can, or stop making presumptions if you can’t. On a number of sites I get redirected to a mobile-optimised view, as I’m guessing that the browser detection script finds ‘Android’ in the UA string and presumes it’s a phone.

By far the worst culprit is Yahoo, whose UA sniffing either misidentifies or fails to identify the browser on my tablet, and serves me the most basic mobile interface. I’m using a brand new tablet with a very capable browser over a solid Wifi connection, and I’m served what is essentially a WAP site.

To add to the frustration, no link to an alternative or full site is provided, so I have no choice at all. If use about:debug and change my browser’s UA string to ‘iPad’, there’s a tablet-optimised version of Yahoo Mail that works (almost) perfectly with my device; but otherwise the UA sniffing is actively working against me.

Capability detection should always be preferable to browser UA sniffing, but if you must use UA sniffing at least keep it updated, don’t make presumptions, and provide an opt-out link to the desktop site as a basic option.

That’s it: two changes, making a much nicer experience for everyone.


Moving on — my plans for the future

I’ve decided it’s time for a change professionally, so I’m moving on from Top10.com at the end of the week. It was a tough decision to make because there’s a lot of really cool and exciting things coming up in their future, but my problem is that between my salaried work and my extra-curricular work, my spare time is far more occupied than I’d like it to be. I’ve come to the conclusion that one of the two has to be chosen, and working for myself comes out ahead.

In the short term I’m going take a few weeks off, and then start writing my second book (I haven’t actually signed the contract for it yet, but it’s been given the go-ahead by my publisher). I’m also working as technical editor for Chris Mills’ book, so the plan is for the money from this and other writing to support me for a bit. I’m talking at more events this year, and the extra time I get will allow me to focus on getting better at that.

Longer term I’m in very early stage planning to put together a co-operative with some friends where we can put our considerable experience to use making interesting and exciting things. That’s about as defined as we are at the moment.

Depending on how long the co-op takes to get off the ground I may be doing some freelance work later in the year, and I’m always open to hearing offers about talks, writing and consultancy, so feel free to get in touch with me about that or any other opportunity you think I might be interested in. Or just get in touch for a chat, as it’s going to be pretty lonely working by myself for the next few months!

I wish the best of luck to everyone at Top10.com, and I’m very excited and apprehensive about being unemployed for the first time since I left school!


Those who forget the past…

There are many who believe that the internet will make us stupid, so it may come as a relief to know that some 2,400 years ago Socrates believed* that the same would happen because of the new art of writing:

This invention will produce forgetfulness in the minds of those who learn to use it, because they will not practice their memory. Their trust in writing, produced by external characters which are no part of themselves, will discourage the use of their own memory within them. You have invented an elixir not of memory, but of reminding; and you offer your pupils the appearance of wisdom, not true wisdom.

And misunderstanding the capabilities of computers is not a recent invention either; in the mid-19th Century the mathematician Charles Babbage, theoretical inventor of the first mechanical computer, complained:

On two occasions I have been asked, — “Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?” I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

I found both of these quotes in James Gleick’s The Information, which despite my being only four chapters in, and the fact that it’s only March, is a candidate for book of the year.

* According to Plato.


The Media Fragments Module

One W3C specification which seems to have slipped below most people’s radar is Media Fragments 1.0, which moved to Candidate Recommendation status in December last year. Media Fragments is a syntax which extends the URLs of media files so that only selected portions are made available to the user; let me explain that further with a couple of examples.

Read the full article


An urgent call to action on vendor prefixes

On Tuesday I wrote a post for Ubelly.com on vendor prefixes; what they are, what they are for, their perceived successes and failures. This turned out to be incredibly timely as a few hours later the minutes of the latest CSS Working Group were released, showing that the misuse of vendor prefixes — especially –webkit–, and especially on mobile — has now become so serious that Microsoft, Mozilla, and Opera are all considering implementing –webkit– prefixed properties in their own browsers just to ensure that their users aren’t excluded from the web.

What a state we’re in.

This morning Daniel Glazman, chair of the CSSWG, issued an open call for urgent action by developers to stop this situation from deteriorating any further, and hopefully to improve it: Call for Action: The open web needs you *now*. I urge you to read this, and to act on it to the best of your abilities. If browsers support other browsers’ prefixes, the whole thing collapses. As Daniel Glazman says:

Vendor prefixes have not failed. They are a bit suboptimal but they also very clearly preserved Web Authors from chaos. We can certainly make vendor prefixes work better but we can only do that if vendor prefixes remain VENDOR prefixes.

Please read his post in full, and do what you can to turn this situation around. We made the mess, we need to clean it up.


Where do we draw the line for browser support?

Prompted by the announcement on 37Signals that their next platform update would not support IE7 or IE8 (or many other older browsers), a vigorous debate took place on Twitter around the subject of for how long we should support browsers which don’t have the most modern features. For all its many positives, Twitter is no place for nuanced argument, so this article is for me to try to frame my opinion a little better.

Read the full article


Archive by category and date