News for hackers. Stuff that matters.
Re:Principles we use to write CSS for modern browsers by davedx on Thursday September 22, 2016 @08:02AM (#12556206)
> 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.

Re:Principles we use to write CSS for modern browsers by freshyill on Thursday September 22, 2016 @08:24AM (#12556287)
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.

Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @09:08AM (#12556536)
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?
Re:Principles we use to write CSS for modern browsers by Roboprog on Thursday September 22, 2016 @12:05PM (#12557811)
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...

Re:Principles we use to write CSS for modern browsers by bigger_cheese on Thursday September 22, 2016 @08:27PM (#12561467)
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.

Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @12:58PM (#12558246)
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!

Re:Principles we use to write CSS for modern browsers by extrapickles on Thursday September 22, 2016 @03:27PM (#12559534)
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.
Re:Principles we use to write CSS for modern browsers by intrasight on Thursday September 22, 2016 @09:45AM (#12556749)
My experience is that that ceased to be the case about a year ago. Now everyone also has Chrome.
Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @09:54AM (#12556812)
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.
Re:Principles we use to write CSS for modern browsers by epmatsw on Thursday September 22, 2016 @11:24AM (#12557455)
Even Epic has dropped IE9 support AFAIK. That's a pretty good indicator to me that healthcare has moved off it.
Re:Principles we use to write CSS for modern browsers by Roboprog on Thursday September 22, 2016 @12:11PM (#12557856)
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.

Re:Principles we use to write CSS for modern browsers by intrasight on Thursday September 22, 2016 @10:54AM (#12557197)
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.
Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @11:28AM (#12557505)
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.

Re:Principles we use to write CSS for modern browsers by moron4hire on Thursday September 22, 2016 @10:22AM (#12556959)
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)

Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @11:29AM (#12557518)
I literally deal with students in every class, a not-small percentage of students, that are disallowed by domain policy from installing another browser.
Re:Principles we use to write CSS for modern browsers by Roboprog on Thursday September 22, 2016 @12:16PM (#12557900)
I know :-(

Give it a year. Without MS support, they will be forced to give up these older versions. Of course by then, IE 11 will seem quite "vintage", but that's life.

Re:Principles we use to write CSS for modern browsers by moron4hire on Thursday September 22, 2016 @01:50PM (#12558669)
I literally think you're an asshole for thinking you know everything about how enterprise works.

IT can be brow beat just as hard as developers. They will change whatever domain policies you make them change. Quit being a pushover.

Re:Principles we use to write CSS for modern browsers by vinceguidry on Thursday September 22, 2016 @09:17AM (#12556592)
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.
Re:Principles we use to write CSS for modern browsers by spdustin on Thursday September 22, 2016 @09:24AM (#12556630)
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.
Re:Principles we use to write CSS for modern browsers by netghost on Thursday September 22, 2016 @02:57PM (#12559252)
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...

Re:Principles we use to write CSS for modern browsers by freshyill on Thursday September 22, 2016 @04:29PM (#12560096)
With flexbox and a fallback, you're future-proofing. If you go with floats or something worse, you're working around yesterday's constraints.
Re:Principles we use to write CSS for modern browsers by kilian on Thursday September 22, 2016 @08:20AM (#12556271)
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.

Re:Principles we use to write CSS for modern browsers by fizzbatter on Thursday September 22, 2016 @08:27AM (#12556299)
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.

Re:Principles we use to write CSS for modern browsers by gotofritz on Thursday September 22, 2016 @08:49AM (#12556424)
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.
Re:Principles we use to write CSS for modern browsers by gbog on Thursday September 22, 2016 @10:46AM (#12557132)
"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.
Re:Principles we use to write CSS for modern browsers by hackerboos on Thursday September 22, 2016 @08:22AM (#12556275)
CanIUse reports bugs in IE11. Anyone had issues in day-to-day development?
Re:Principles we use to write CSS for modern browsers by thirdsun on Thursday September 22, 2016 @08:31AM (#12556321)
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.

Re:Principles we use to write CSS for modern browsers by freshyill on Thursday September 22, 2016 @08:26AM (#12556296)
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.

Re:Principles we use to write CSS for modern browsers by ggurgone on Thursday September 22, 2016 @08:49AM (#12556425)
Re:Principles we use to write CSS for modern browsers by NKCSS on Thursday September 22, 2016 @08:54AM (#12556455)
It's still common to find Citrix environments with IE 8/9 here in .nl healthhcare sector
Re:Principles we use to write CSS for modern browsers by javajosh on Thursday September 22, 2016 @09:44AM (#12556742)
Someone should write an exploit for IE 8/9 that upgrades them to Firefox.
Re:Principles we use to write CSS for modern browsers by talmand on Thursday September 22, 2016 @01:06PM (#12558312)
Google did that back in the day with Chrome.

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

Discontinued though.

Re:Principles we use to write CSS for modern browsers by guessmyname on Thursday September 22, 2016 @08:35AM (#12556333)
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.
Re:Principles we use to write CSS for modern browsers by asb on Thursday September 22, 2016 @08:55AM (#12556461)
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.
Re:Principles we use to write CSS for modern browsers by Brendinooo on Thursday September 22, 2016 @08:42AM (#12556377)
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.
Re:Principles we use to write CSS for modern browsers by numbnuts on Friday September 23, 2016 @07:26AM (#12563749)
Re:Principles we use to write CSS for modern browsers by talmand on Thursday September 22, 2016 @02:53PM (#12559210)
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?
Re:Principles we use to write CSS for modern browsers by MatekCopatek on Thursday September 22, 2016 @08:16AM (#12556252)
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.

Re:Principles we use to write CSS for modern browsers by ggurgone on Thursday September 22, 2016 @08:24AM (#12556288)
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.

Re:Principles we use to write CSS for modern browsers by bobbytherobot on Thursday September 22, 2016 @04:33PM (#12560133)
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.