CSS grid in Internet Explorer 11

When I was in Boston, speaking on a lunchtime panel with Rachel at An Event Apart, we took some questions from the audience about CSS grid. Inevitably, a question about browser support came up—specifically about support in Internet Explorer 11.

(Technically, you can use CSS grid in IE11—in fact it was the first browser to ship a version of grid—but the prefixed syntax is different to the standard and certain features are missing.)

Rachel gave a great balanced response, saying that you need to look at your site’s stats to determine whether it’s worth the investment of your time trying to make a grid work in IE11.

My response was blunter. I said I just don’t consider IE11 as a browser that supports grid.

Now, that might sound harsh, but what I meant was: you’re already dividing your visitors into browsers that support grid, and browsers that don’t …and you’re giving something to those browsers that don’t support grid. So I’m suggesting that IE11 falls into that category and should receive the layout you’re giving to browsers that don’t support grid …because really, IE11 doesn’t support grid: that’s the whole reason why the syntax is namespaced by -ms.

You could jump through hoops to try to get your grid layout working in IE11, as detailed in a three-part series on CSS Tricks, but at that point, the amount of effort you’re putting in negates the time-saving benefits of using CSS grid in the first place.

Frankly, the whole point of prefixed CSS is that is not used after a reasonable amount of time (originally, the idea was that it would not be used in production, but that didn’t last long). As we’ve moved away from prefixes to flags in browsers, I’m seeing the amount of prefixed properties dropping, and that’s very, very good. I’ve stopped using autoprefixer on new projects, and I’ve been able to remove it from some existing ones—please consider doing the same.

And when it comes to IE11, I’ll continue to categorise it as a browser that doesn’t support CSS grid. That doesn’t mean I’m abandoning users of IE11—far from it. It means I’m giving them the layout that’s appropriate for the browser they’re using.

Remember, websites do not need to look exactly the same in every browser.

Have you published a response to this? :

Responses

Šime Vidas

Stop using Autoprefixer? Hm, that doesn’t make much sense to me. Autoprefixer either adds prefixes that you need, or it’s a no-op, so why would you ever choose to remove it?adactio.com/journal/14131

Florens Verschelde

In which @adactio writes “I’ve stopped using autoprefixer on new projects, and I’ve been able to remove it from some existing ones—please consider doing the same.”adactio.com/journal/14131 I’ve considered doing that, as my main use case for prefixes was flexbox in Safari 6.1–8.

Sara Soueidan

“You could jump through hoops to try to get your grid layout working in IE11 […] but at that point, the amount of effort you’re putting in negates the time-saving benefits of using CSS grid in the first place.“ – @adactioadactio.com/journal/14131 So much this!

2 Shares

# Shared by Gunnar Bittersmann on Friday, July 13th, 2018 at 12:33pm

# Shared by Xavier Zalawa on Wednesday, August 29th, 2018 at 1:45pm

5 Likes

# Thursday, January 1st, 1970 at 12:00am

# Liked by Letra Studio on Friday, July 13th, 2018 at 12:42pm

# Liked by Qasim on Friday, July 13th, 2018 at 3:36pm

# Liked by Philippe Vayssière on Wednesday, August 29th, 2018 at 7:15pm

# Liked by Amber Wilson on Thursday, November 1st, 2018 at 11:41am

Related posts

Making the Patterns Day website

The joy of getting hands-on with HTML and CSS.

Faulty logic

CSS logical properties here, they just aren’t evenly distributed yet.

Sass and clamp

Worst buddy movie ever.

South by CSS

Talking to the browser makers about vendor prefixes.

Prix Fixe

Hyperlinks relating to CSS vendor prefixes.

Related links

How Flexbox Works

A really deep dive into flexbox. This is a great example of what I categorise as “thinking like a browser” (a skill I recommend for any front-end developer).

Tagged with

Modern CSS in a Nutshell - Cloud Four

I like this high-level view of the state of CSS today. There are two main takeaways:

  1. Custom properties, flexbox, and grid are game-changers.
  2. Pre- and post-processers are becoming less and less necessary.

This is exactly the direction we should be going in! More and more power from the native web technologies (while still remaining learnable), with less and less reliance on tooling. For CSS, the tools have been like polyfills that we can now start to remove.

Alas, while the same should be true of JavaScript (there’s so much you can do in native JavaScript now), people seem to have tied their entire identities to the tooling they use.

They could learn a thing or two from the trajectory of CSS: treat your frameworks as cattle, not pets.

Tagged with

[css-grid-2] Masonry layout · Issue #4650 · w3c/csswg-drafts

This is an interesting looking proposal for CSS grid to be ever so slightly extended to enable Masonry-style auto placement—something’s that tantalisingly close right now, but still requires some JavaScript to do calculations.

Tagged with

The “P” in Progressive Enhancement stands for “Pragmatism” - Andy Bell

With a Progressive Enhancement mindset, support actually means support. We’re not trying to create an identical experience: we’re creating a viable experience instead.

Also with Progressive Enhancement, it’s incredibly likely that your IE11 user, or your user on a low-powered device, or even your user on a poor connection won’t notice that they’re experiencing a “minor” experience because it’ll just work for them. This is the magic, right there. Everyone’s a winner.

Tagged with

CSS Frameworks Or CSS Grid: What Should I Use For My Project? — Smashing Magazine

Rachel does some research to find out why people use CSS frameworks like Bootstrap—it can’t just be about grids, right?

It turns out there are plenty of reasons that people give for using frameworks—whether it’s CSS or JavaScript—but Rachel shares some of my misgivings on this:

In our race to get our site built quickly, our desire to make things as good as possible for ourselves as the designers and developers of the site, do we forget who we are doing this for? Do the decisions made by the framework developer match up with the needs of the users of the site you are building?

Not for the first time, I’m reminded of Rachel’s excellent post from a few years ago: Stop solving problems you don’t yet have.

Tagged with

Previously on this day

8 years ago I wrote Save the dates for Indie Web Camp Brighton 2016

September 24th and 25th. Be there and be square.

10 years ago I wrote The tide

Living in a world that feels wrong.

12 years ago I wrote Austin Apart

A conference in Texas. No, not that one.

18 years ago I wrote Podcasting d.Construct 2006

I’m making my first foray into the world of podcasting.

21 years ago I wrote Photos

My friend Andy Budd, from Message, has just launched a website to showcase his photography.

22 years ago I wrote Goin' up the country

I’m off to Somerset.