Live data from Hacker News

Why is CSS the way it is?

increment.com

51–60 of 173 posts

Re: Why is CSS the way it is?

#51
post #24

Earlier quoted context omitted.

CSS clicked for me from the very start. It was always fun, I never had problems with it (aside from the browser bugs, of course). Maybe problem others have with it is not because of the nature of the CSS, but because of people ignoring that nature and refusing to learn it and trying to carry over their experience with other technologies to CSS.

You were never asked to implement a simple three column layout in CSS where the center column expands with the screen size? That’s often the first thing people were asked to do in the early days after being asked to replace the old table based layout. CSS grid/flexbox took way too long to arrive.

… and have text baselines align between the columns. Good luck.

Re: Why is CSS the way it is?

#52

Earlier quoted context omitted.

> You can't work out the logical consequences of seemingly obvious properties. Could you expand on this a little / give an example?

Given my thoughts (and recent experience) was shaped by something like Elm-UI - see: https://www.youtube.com/watch?v=Ie-gqwSHQr0 If you have the time to learn CSS, you have the time to learn anything else. ;)

Though any self-respecting web developer should sit down and learn CSS.

Part of the problem with CSS is that we seem to relegate it to something we don't need to learn. "Well, it's just CSS. I'm a developer!" And then we complain when we don't understand it or when our jerry-built sequence of StackOverflow copy-and-pastes is a clusterfuck to deal with.

I myself realized I was working off knowledge I read in a CSS book I read in 2004, so I committed a week of updating my knowledge on my own. I realized very few people actually do that, as I'd easily gone 15 years without doing it, and even with my 2004-level knowledge of CSS I'd always be amazed when a fellow 30-yo web developer didn't know how you can offset absolutely-positioned children inside a relative-positioned parent or something just as entry level. Just like, until recently, I'd probably amaze someone that I didn't know what the rem, vh, and vw units were.

Re: Why is CSS the way it is?

#53

IMHO this article inadvertently shows why people hated CSS at the start. He spends a lot of time talking about color space conversions that few developers care about and Unicode filtering that even fewer people know about but glosses over basic layout by mentioning how floats allow for better inline images. It’s like the designers didn’t even think about layout because that problem was already solved with HTML tables…

Counterpoint: I think that if we'd solidified flexbox or grids too early, before people started making full-fledged single-page apps with toolbars and sidebars and panels oh my... we might have easily missed crucial use cases, and the "anti-table war" turning into the "anti-flexbox war" might have shattered the ecosystem. And the inevitable "display: flexierbox" to fix the shortcomings would be a recipe for disaster. With such high bars for backwards compatibility, it's good that we moved slowly.

Re: Why is CSS the way it is?

#54
post #33

Earlier quoted context omitted.

Flash websites were awesome. the player needed work, but for end users there web was a much more interesting and diverse place

Unless you used a screen reader

or, frankly, any of the features provided by your internet browser. back button, bookmark, open link in new window...

(i'm interpreting 'flash websites' as 'websites made in flash'. i'm not referring to websites that contained flash applets.)

Re: Why is CSS the way it is?

#55
post #53

IMHO this article inadvertently shows why people hated CSS at the start. He spends a lot of time talking about color space conversions that few developers care about and Unicode filtering that even fewer people know about but glosses over basic layout by mentioning how floats allow for better inline images. It’s like the designers didn’t even think about layout because that problem was already solved with HTML tables…

Counterpoint: I think that if we'd solidified flexbox or grids too early, before people started making full-fledged single-page apps with toolbars and sidebars and panels oh my... we might have easily missed crucial use cases, and the "anti-table war" turning into the "anti-flexbox war" might have shattered the ecosystem. And the inevitable "display: flexierbox" to fix the shortcomings would be a recipe for disaster.…

That's not a valid counter point.

Tk (https://en.wikipedia.org/wiki/Tk_(software) ) first appeared in 1991. It predates the web. It had efficient and powerful layout managers from the start: http://zetcode.com/gui/tcltktutorial/layout/

The web basically offered... nothing. It just ignored everything else going on.

Re: Why is CSS the way it is?

#57
"People were excited just to see documents that lived on other computers across the world—and not just in plain text, but with headings and lists, too!" - I remember that feeling so well.

Re: Why is CSS the way it is?

#58
CSS is amazing. It's hilarious to watch the twisted ways people will work around it, or spend time making libraries to find solutions to problems that don't exist; without ever even trying to get comfortable with it. Its an amazing and simple piece of technology. Kind of a shame. Id love a real history and critical discussion on the "tools" we have now for web dev.

Re: Why is CSS the way it is?

#59
post #3

Earlier quoted context omitted.

It was called Flash.

Everyone loves to hate Flash, but as an environment to create things it was actually great. It was the player that wasn’t great.

Speaking of Flash and alternatives to CSS there was a whole UI language built to run in the Flash player called Flex which had an amazing layout engine. You could - in code - define your own layouts which could then be used on any components. I've been wishing someone would port this to javascript for years. Imagine if developers could have just created FlexBox when it was needed fifteen years ago instead of waiting on W3C.

Re: Why is CSS the way it is?

#60

The biggest issue with CSS I think for many is the emergent complexity from the interaction of different properties. Especially those inherited through the cascade. Much of this emergent complexity is not always consistent cross-browser. Additionally, there are often many ways to accomplish the same result but fully understanding the implications of certain approaches over others is also a headache at times. Speaking…

The biggest issue with CSS I think for many is..

..that they haven't looked at it for years and assume it's still as hard to use as it was when it was new. In any discussion about CSS someone will eventually post that "vertical and horizontal centring is really hard, and that's why CSS is terrible"[1], and all it shows is that their skills are out of date.

[1] Seriously, it's as easy as "display: grid; place-items: center;" these days (if the element has width and height somewhere in the cascade).

Post reply on HN