Hacker News new | ask | show | jobs
by davedx 3561 days ago
> Flexbox is awesome. No need for grid framework;

Yes, great, if you can ignore all the IE users. Is that what "modern" means?

I'd love to use flexbox where I work, but it's just not feasible to give up all the customers we would lose.

6 comments

Why not both? Global flexbox support is >96% and in the US it's >97%.

Unless you're aiming for a 1:1 pixel-perfect experience in crappy old versions of IE, it's negligibly simple to detect IE (or lack of flexbox support), and just use something else. You can usually get pretty close to a lot of flexbox layouts with display: table and related properties, and also falling back to floats for others.

In a worst case scenario, you can provide old IE with a more mobile-like experience and just let things stack up.

Enterprise in the US. IE9 still rules, in many cases. I actually work all over this space, do not tell me otherwise. And now I have to maintain two codebases?
Been there, done that. But you might mention to bosses/clients that MS no longer supports/patches anything older than IE-11 on desktop versions of Windows. They are most likely using an un-patch-able version of Explorer.

Virii, Trojans and Hacks, oh my!

https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE...

My work "upgraded" to IE 11 late last year. The problem is so much of our internal infrastructure was built to target IE 8 (or earlier) that when our information services guys deployed IE 11 they forced it to run in compatibility mode.

Now you have to go through this endless dance of Enable/Disable compatibility mode depending on what site you are trying to visit. We have a lot of non technical users so as soon as you ask them to delve into menu options to use some added functionality on a site you lose them.

Even technical users hate this so most people sideload chrome. However a large number of workstation are locked down and those people have no option but to continue with IE.

Excellent advice that I give my students, and readers here will be well-served in following it.

I don't even want to admit how many managers come back to them with "we mitigate that risk with user education, we have too many legacy (blah blah blah)." There's always some excuse, isn't there? Usually within departments, but once executive-level hears this sort of thing, they tend to at least investigate what the real risks are. So I'm adding on to your advice to other readers to suggest they "go higher" with their security warning.

Man, I wish we lived in a world where management understood that people are shockingly good at finding ways of not doing what they're told!

We use nw.js (customizable webkit browser) to provide an "application" for those customers that only have IE9 so we don't have to support IE9 in the web application. Sales pages still need to support IE9 though as they use IE9 to find the product.
My experience is that that ceased to be the case about a year ago. Now everyone also has Chrome.
Your experience isn't in healthcare, finance, military, manufacturing or oil and gas (to pop a few verticals off the top of my stack), it would seem. Literally 80% of my (adult, American-enterprise-employed) students in 2015-2016 so far have IE9 as their desktop standard, and have to beg for a special exemption to be allowed to install Chrome or Firefox.
Even Epic has dropped IE9 support AFAIK. That's a pretty good indicator to me that healthcare has moved off it.
Seconded. I am working on a project at UCD Med Center for California Dept of Public Health, which includes a pilot tie-in with Epic (even if it's just Epic shaking hands with our system and putting a short task's page in a frame).

We started out in late spring / early summer back in 2015 saying we needed to support IE9, but that has since changed to 11. The notice from MS that nothing before 11 would be supported after January of this year (2016) forced the issue, I think.

Back when I worked at a financial company two years ago we sure had mandatory crusty old versions of IE, though. Except for the groups that got special permission to use a browser that actually worked for things they had to have.

Besides military (haven't done that in 10+ years), I'm in all those other verticals and more. All desktops now have IE11 (because MSFT pretty much says "you must") and Chrome.
I wasn't speaking figuratively when I said literally, you know. :)

It's a breath of fresh air when an enterprise student has a modern environment. But it's enough of an outlier (in my experience teaching all these different places) to still surprise me to hear when it's true.

I've done those verticals, too. We always had Firefox. I don't know what it's like now. That was 10 years ago.

(AKA sit down and shut up with your bullshit "sit down and shut up"s)

I literally deal with students in every class, a not-small percentage of students, that are disallowed by domain policy from installing another browser.
Your problem is actually simpler than if you had to maintain modern consumer-facing web apps, which have to deal with users across three broadly-defined screen sizes and a variety of mobile APIS. If you're serving the enterprise, then you can make assumptions about your audience that greatly simplify development.
Those assumptions are nowhere near as simple as you think when you are in a space that supports a large majority of all enterprise. You would shudder to see what real-world browser support is like when you write software to be used in that space.
At the point when you write fallbacks for IE, you might as well just use an approach that works for all your supported browsers, otherwise you've got twice as much to verify and maintain.

Check this out for an alternative to flexbox if you can't ignore that last n% of your users: https://kyusuf.com/post/almost-complete-guide-to-flexbox-wit...

With flexbox and a fallback, you're future-proofing. If you go with floats or something worse, you're working around yesterday's constraints.
Flexbox is supported in all versions of IE that Microsoft themselves still support (IE 11 and up). You can still support it in IE10 too, albeit with a different syntax.

That means even windows installations that haven't been updated since 2012 will support flexbox.

Unfortunately that still leaves out a ton of users. I know that's a tiny percentage, but tiny nonetheless. The shop i'm heading to soon has a small number of clients (<5k, each being very important), but with many using ancient systems. IE8/9 iirc. We use Table layouts for our "old compatible" product, and i don't think we'll ever move on from that. Some clients just refuse to update it seems.

Luckily (for my sanity) we have a "new age" product that we can use responsive layouts for.

Supporting old browsers should be treated as a special case though, like "people with js disabled" or something. Then of course you don't use flexbox (or serve different css fles or have a scaled down design or whatever). But the "norm" is that flexbox is now safe for most users.
"Refuse to update" well yes, I would too, refuse to do something that is notoriously breaking a lot of working stuff for no known benefit. For example java applets developped for IE6 that is vital, because it drives the 10 years old exotic scanner, and nobody dares touching it.
CanIUse reports bugs in IE11. Anyone had issues in day-to-day development?
Of course. there are lots of minor issues and surprising results with flexbox in modern IE and Firefox once you use it in more advanced ways. See https://github.com/philipwalton/flexbugs for an overview.

Nevertheless I use flexbox almost everywhere. It's a great system to arrange anything from general layout to smaller components. There's absolutely no way that I'll deal with any kind of hacks to get basic things like vertical centering right.

Check here for a pretty comprehensive listing of flexbox-related bugs.

https://github.com/philipwalton/flexbugs

I haven't come across anything in IE 10 or 11 that I haven't been able to work around pretty easily.

It's still common to find Citrix environments with IE 8/9 here in .nl healthhcare sector
Someone should write an exploit for IE 8/9 that upgrades them to Firefox.
Google did that back in the day with Chrome.

https://www.chromium.org/developers/how-tos/chrome-frame-get...

Discontinued though.

Last week I was in an interview with Amazon for a position in their web development team. One of the questions was related to this, they asked me to describe how to create the layout for a web page with two columns, I immediately thought about Flexbox but decided to describe the code using "float: (left|right)" and box-sizing, I felt that the two interviewers didn't like my answer because it is outdated.
Honestly that sounds like a case where you could improve your interview technique (or perhaps the interviewers could have done better on drilling down into your thinking). The fact you considered multiple options, evaluated them mentally and decided to describe the approach that would have highest compatibility is great, and explaining your thinking to the interviewers could have helped.
I can't find the source right now, but I've read that flexbox for page layout can still be problematic because a lot of times when you use flexbox it'll rely on the content inside of it to determine its flex width. So you'll get a bunch of page reflows while content is being loaded, which is less than ideal.
I feel the interviewers didn't do their part in that exchange considering there are multiple valid ways of completing that task. As an interviewer I would have followed up with saying that method is not allowed for some made up reason, what's another way to do it?
This largely depends on your target audience. Flexbox is only problematic for IE <= 9, which, according to caniuse.com accounts for less than 1% of all browsers.

But this should always be checked against more relevant stats (your country, old website you're redesigning, etc.), so yeah, if you know you have a lot of people on IE9 and lower, flexbox is out of the question.

There is a suit component for making flexible layouts in legacy browsers https://github.com/suitcss/components-arrange

It is not as feature-rich as flexbox is but it works great - I built a similar one when I used to work at Yelp https://www.yelp.com/styleguide#section-arrange and it scales well.

I've been using flexbox for the past 1.5 years. I'll add fallbacks, but it really is minimal if you are willing not to have it pixel perfect.

Sometimes though I will use the fallback because it actually does it better than flexbox.