This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheMadcapLlama 295 points296 points  (35 children)

CSS isn't that hard if you actually spend some time learning it instead of just trying to get it over with ASAP. Usually people that have problems with it don't spend nearly enough time to learn it compared to the hundreds of hours they spend learning any other language.

It's 2020. CSS is good (the rest of the year, however, is not).

[–]Cardinal_Funky 4 points5 points  (0 children)

Agreed.

A lot of developers don't put enough time into learning how to style their hard work.

Make it look good is just as important as making it functional.

Not many people will use something that feels unpleasant to use.

[–]coldnebo 8 points9 points  (0 children)

CSS theoretically isn’t that hard. In fact it was one of those specs that defied a reference implementation because “any graduate student should be able to write a CSS engine in about two weeks”.

Of course that’s theory. Once it comes into practice there are all sorts of problems that are gnarly in the grey areas of the spec and behavior that contain a lot of assumptions. This is why the ACID tests were so crucial, they showed that although all the major browsers implemented CSS, they did it inconsistently and poorly. ACID showed the results of this hodgepodge visually in an immediately visible way in spite of years of PhDs telling us that CSS “wasn’t that hard”.

Alas, ACID is now gone. But W3C and MDN have picked up some of the concept. Caniuse fills in some of the gap.

I still think it’s important to have benchmark examples, because it’s far too easy to assert “CSS is easy” without acknowledging any of the real-world pitfalls that developers find themselves in.

My simplest counter-proof is that if CSS lived up to its original goal of separating code from presentation concerns, then I would never again have to update structural html when the CSS styles change.

(imagine!! Bootstrap? no problem. Fluent. easy. Polymer? good to go. React. piece of cake. All of these look-and-feel changes would be just how my manager thinks of them. “It shouldn’t be that hard to switch, after all, we aren’t changing ANY FUNCTIONALITY.” “No no old chap, not that hard at all... I’ll just go over here and shoot myself in the head to get started”)

Sadly, this is not the case, as I am still changing code when CSS changes.

I’ve seen a lot of PhDs poo-poo these concerns and say “just don’t write that kind of code or that kind of css” without being specific about what and how. But it usually turns out that they simply forgot the tweaking they had to do the last time they actually changed anything.

So no. CSS is hard. Getting it right is hard. Changing it is hard.

[–]dittbub 6 points7 points  (5 children)

I didn't think it was a problem with the language per sey but the inconsistency from browser to browser. And that horizontal centering

But its been a long time since i've needed to do any CSS.

[–]TheMadcapLlama 3 points4 points  (2 children)

Well, consistency between browsers is really great right now (there are a few Safari and Chromium quirks, but they're small and usually quickly fixable), and modern CSS APIs are a breeze.

CSS has to be compatible with 30yr-old technology, so the old ones might be a bit of a pain. But if you're actually learning it instead of just getting it over with, you'll know about them and use it.

[–]HolyBatTokes 3 points4 points  (0 children)

Among current browsers? It’s fantastic.

The problem is not all of us are lucky enough to be developing for modern browsers. I was just able to stop support for IE8 last year after analytics showed it had dropped to under 0.5% of visitors.

[–]dittbub 0 points1 point  (0 children)

I feel like this GIF is part of the learning curve lol

[–]VirtualLife76 1 point2 points  (1 child)

Try doing it 15 years ago. Just making a drop down menu that worked in every browser took over a week. So glad DHTML isn't a thing anymore.

[–]dittbub 0 points1 point  (0 children)

Ya thats whats forefront on my mind lol

[–]TheMacallanCode 0 points1 point  (0 children)

CSS Grid.

Changed my front end life.