Hacker News new | ask | show | jobs
by bradley13 862 days ago
The "how to center" is a classic question for CSS. The fact that it is not blindingly obvious is indicative. CSS is a miasma. A kitchen sink collection of stuff designed, not by one committee, but by several committees simultaneously.

They have long since given up on actual releases. Instead, the current state of CSS is a collection of states of individual modules, all of which are under continual change.

This is not how you develop software. Or anything, really.

/rant

2 comments

I both agree and disagree. This is just how how larger groups of humans work, slowly and chaotically. Herding cats. It's also not clear where we're collectively going with the web and all of its technologies, so there will be lots of failed experiments and disagreements. There's a much broader scope here than a well planned engineering project with a clear goal and path.
Regarding centering - eh. I think this question comes up so often because it is simply the natural question to ask.

What are the first things someone learning how to make a web page visually look how they want is going to learn? Probably text size, color, background color, and alignment. All of these except alignment translate pretty much 1:1 from pre-css days. Color on the body tag, size/color on the tag surrounding the text you want styled. Or, css color/font-size property on the surrounding tag, or background-color on the body. All very similar.

Prior to CSS, if you wanted content centered, you just slapped it in a <center> tag. Didn't matter if it was text or html objects like divs, tables, buttons, etc. IMO too many people expected CSS to work like what we had in the past - no distinction between inline and block objects - and when CSS didn't fit their pre-conceived mental model, these questions came up. And centering just happens to fit in the niche of being basic enough that beginners want to know about it.

According to this, most CSS issues boil down to “you don’t know CSS and have a wrong mental model”. Well, if most people who enter it have a wrong mental model, it’s not their fault that the “correct” model is absolutely alchemic in its nature.
"Software that doesn't conform to my pre-conceived mental model is poorly made".

No, what you said is not the point of what I wrote. "Wrong" in the sense that it's an imported assumption that has nothing to do with the technology at hand. And don't see anything wrong with that. Having an open mind when leaning something new is important.

Agree on the statement, disagree on the sentiment. You only have that much capacity. If people have preconceptions that clearly correspond to tasks/solutions they have in mind, it's absolutely unwise to ignore this free part in your design and design something that makes it completely irrelevant.