CodingJohnson

Archive for the 'HTML5' Category

27 October
2Comments

CSS4, Does It Matter?

I’ve spent the last hour or so poring over the first draft of the CSS4 spec, there’s some new features in there but nothing earth shatteringly amazing. About the biggest addition I liked was the new ability choose the subject of your selector using the $ symbol, a feature I’ve thought would be useful for years but I’ve since learnt tricks to get around it.

Targetting It Already?

It occurred to me that it is good practice to support older browsers and not to specifically target the new and amazing CSS/4 and HTML5/6 since it’s likely you’d be instantly narrowing your market share. What I mean is, you’d only ever be targeting the early adopters by targeting these new languages. Not to mention, we also need to give ourselves the chance to learn the technologies as well as give the browser manufacturers the chance to implement them.

The Lowest Common Denominator

Browser variations aren’t the only thing we should consider when choosing technologies for writing websites, we should also consider the fragmentation of mobile operating system distributions and the varying browser implementations that are on each platform - what they are most likely to implement is the lowest common denominator abilities in modern(ish) websites and are likely to perform better if the site doesn’t take up too much bandwidth.

It’s ridiculous these days that we expect to build webpages some ~700kb in size and include libraries that we are likely to only use a fraction of the features in. It may make animations nicer and avoid Flash but we often forget that for the best User Experience we should use these subtly and sparingly.

Use Only What You Need

With the advent of new HTML and CSS specs it does become more exhaustive to implement for every browser quirk and mis-implentation - which thankfully is something we don’t have to worry about thanks to the abstraction layer that libraries like CoffeeScript and jQuery provide. But think how much faster and more beneficial it would be to use more common, older routines that would be cross-browser to deliver a better User Experience at the expense of some development time, surely this would only serve to better our understanding of writing common and reusable CSS and JavaScript?

If there’s one message I hope to convey from this it’s we should aim to learn the new, and master the old