Stuff & Nonsense Home

Where you’ll find designer, author and speaker Andy Clarke. The bastard.

Blogging And All That Malarkey

Responding

After pushing my redesign live yesterday, I’ve been asked a few times about why I pulled respond.js (and with it, CSS3 Media Query support for older versions on Internet Explorer) from the new site.

Scott Jehl’s Respond has become the defacto standard polyfill for min/max-width CSS3 Media Queries. It’s small and fast and if you’re looking to plug that particular hole, it’s the script I’d recommend. But during my redesign (and in my current client work) I’ decided to take a different direction. I’m serving a fixed-width design to Internet Explorer versions 8 and below.

Internet Explorer 9 on the desktop supports CSS3 Media Queries just fine and although I’ve yet to test it, I think the same goes for Internet Explorer on Windows Phone 7 Mango. That leaves older versions on the desktop and mobile.

If we’re taking a ‘tiny screens first’ approach and using ‘320 and Up’, the first Windows Phone 7 phones’ lack of CSS3 Media Query isn’t a problem as users will see only colour and type styles but no layout.

On the desktop it’s a tougher call, but I figure that Windows users are so used to maximised browser windows and the fixed-width and centred designs we’ve been serving them for so many years, that Internet Explorer 8 (and below) users won’t know that they’re missing a flexible design.

That’s why I serve every breakpoint stylesheet and added fixed widths rules for Internet Explorer versions 8 and below.

‹!--[if (lt IE 9) & (!IEMobile)]›
‹link rel="stylesheet" href="480.css"›
‹link rel="stylesheet" href="768.css"›
‹link rel="stylesheet" 992.css"›
‹![endif]--›
.ie7 .content,
.ie8 .content { width : 896px; }

Everything inside can remain flexible. That saves time and extra lines of CSS.

For my site — and the client sites I’m currently working on — the extra development overhead and Respond’s, albeit minimal, performance hit outweigh the advantages. Of course, a decision like this hangs on a great big “it depends” but I suspect that for many of us, serving CSS3 Media Queries to browsers that aren’t natively capable of supporting them is a luxury that we, and our users, can live without.

Leave your comment

Agustín Amenabar

October 31 2011 @ 04:43pm #

THIS IS SUCH A COMPLICATED ISSUE!

Up until last week I had this approach,; specially considering there still are work places where people has from ie8 to ie6 with javascript disabled, whom oddly are a bigger audience than lo-end mobile devices.

But then I was convinced by the argument of lo-bandwidth on all mobile devices should be addressed, so I had to build mobile first. Then again, old browsers, are usually run on old computers (not IE8) and polyfills eat up processing time.

Your position is a bit fascist, but I’m comfortable with fascist web design, or we’d be still supporting ie5.  This is such a hard decision, but as you say, it’s a case by case situation.

Richard Sweeney

October 31 2011 @ 09:41pm #

I think this is a really interesting solution and to my mind one of the best I’ve heard. This will be my new approach from now on. Fits in perfectly with the idea of user expectation. Fab

Pete Hawkins

October 31 2011 @ 10:03pm #

For the most part I have the pleasure of working on projects that I don’t need tO support anything below IE 8. However whe. I do have the odd site to build that has to be supported back to IE6 it’s even more of a nightmare because I don’t have a particular game plan, your approach is very nice indeed and I might tinker with that for the next site I need to make that works in out of date browsers.

Justin Avery

November 1 2011 @ 03:11am #

Cheers for the insite into your thoughts around coding it in a particular way.

It’s great to know techniques that are available to polyfill older browsers, but I think quite a few people are interested in the reasons why you would go one way or the other to back up the technical how-to.

Thanks @malarky!

*note* Captcha ? Really?

Daniel Nitsche

November 2 2011 @ 01:15am #

Since I stumbled across (and started using) 320 and up a few months ago, I’ve actually been doing exactly the same thing, and for the same reasons: performance/robustness of respond.js in IE seemed flakey, and serving all stylesheets to IE via conditional comments seemed like the best solution.

Keep up the great work.

Gilles Vandenoostende

November 2 2011 @ 03:13pm #

I’ve independently arrived at a similar solution a few months ago, but I used LESS CSS to compile 2 separate CSS files (one for modern browsers, one for < IE9) from the same source-code instead of linking to all separate “breakpoint” css files: http://blog.vandenoostende.com/2011/sensible-mediaqueries/

Handy if you’re used to working with LESS, and have to deal with situations where you’re trying to minimize the amount of requests/file dependencies.

Commenting is not available in this channel entry.
Hardboiled Web Design

Hardboiled Web Design by Andy Clarke

How the latest technologies and techniques will make your websites more creative, flexible and adaptable. Get hardboiled in all formats from Five Simple Steps. Digital formats also available at Amazon.com, Amazon.co.uk and the iBooks store.

We’ve deconstructed this site to focus on content while we restyle. Expect wonkiness during the transition.