Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

231–240 of 473 posts

Re: Hardest problem in computer science: centering things

#231

Earlier quoted context omitted.

It is a weird myth that CSS somehow discourages tables. CSS have supported styling html tables and ‘display:table’ (allowing a table-like layout without html-tables) for 25 years. Float and clear was grandfathered into CSS since they were added to HTML by Netscape. They are fine for their intended purpose: placing images in a text and have the text flow around. Other positioning systems you mention does not solve the…

I absolutely remember a ton of pieces about how we all needed to stop using tables (and 1x1 transparent gifs, too) for page layout because CSS was The Right Way

The issue is people taking “tables are bad for non-tabular layout” and just remembering the first three words. People like stark binary yes/no rules, so “tables are bad” was born and spread widely.

If your layout is intended to be a table, then a table (styled with CSS) is the way to go, otherwise use semantic HTML (styled with CSS) and you will (in theory) have an easier time making the design work well at different sizes/resolutions and in alternate UAs like screen readers.

Re: Hardest problem in computer science: centering things

#232

Don't read this article, if you are not in web dev. Once you start seeing it, you can't stop seeing it, and it will drive you crazy forever. It is the same for noticing misalignment, recognizing color oversaturation, high quality speakers/headphones, etc. (It is a good article!)

[flagged]

All of those are manifestations of the same thing: not caring enough.

Re: Hardest problem in computer science: centering things

#233
post #72

That's because CSS layout was designed by people who thought "float" and "clear" were a good idea, tables were bad, and, when in doubt, make it Turing-complete and dump the problem on someone else. 2D and 3D tools get this right. CAD programs, game engines, and animation programs are all far better at positioning things. They have far better layout engines and constraint systems. This is really a constraint problem.…

Do the tools you say do it better than html also handle the variety of clients html documents are expected to work with? Or handle accessibility better?

XAML/Silverlight was pretty fantastic. Significantly more sane layout model (by virtue of having more than a mote of sanity at all). It did handle a very wide gamut of clients during its time.

Why? Because it was designed for creating apps, not documents. HTML is great for creating documents, most of the examples in the post are not documents.

Re: Hardest problem in computer science: centering things

#234
post #98

Don't read this article, if you are not in web dev. Once you start seeing it, you can't stop seeing it, and it will drive you crazy forever. It is the same for noticing misalignment, recognizing color oversaturation, high quality speakers/headphones, etc. (It is a good article!)

The same happens when you: - Install flooring - Install trim in your own home - Build / install cabinets You will now see: - Odd flooring patterns and uneven floors - Know what it looks like when trim isn't coped - Uneven gaps between doors

Oh yeah, ignorance is bliss. :)

Re: Hardest problem in computer science: centering things

#235
post #193

Earlier quoted context omitted.

I’ve noticed these things all my life. Even as a young child I would point such things out and others would have trouble seeing it. Once I was diagnosed with autism, this tendency of mine made a lot more sense. I’m curious if other people detect interrupted or irregular patterns so readily. It’s like there’s a part of my brain just looking for anomalies and I can’t turn it off.

I have this with grammar. When I read modern websites, articles, papers, emails from HR, etc. with their sloppy English and comma-splices everywhere, it annoys me way too much and it's a real challenge to push on through and keep reading. It feels like walking through a maze, with an uneven floor and bad lighting, full of dead-ends, compared to walking down a pleasant, well-lit corridor.

For me, it's the all-lowercase style of some of the current in-vogue AI leaders like Sam Altman that drives me crazy.

Is your shift key... broken? No? Use it please.

Re: Hardest problem in computer science: centering things

#237
post #202

In case the author reads this: Please respect prefers-reduced-motion for your cute mouse cursors that wander over the screen in a very distracting fashion. In the meantime, as a fix for others, in uBo add tonsky.me##.pointers

I disagree, as that implicitly endorses this sort of distracting nonsense, because “there's a setting to turn it off if it bugs you”.

While I agree, it usually seems the majority of HN does not, and sees it as promoting the boring corporate web of today instead of the creativity of MySpace/Geocities pages -.- Accessibility is often frowned upon by commenters.

Re: Hardest problem in computer science: centering things

#239

Earlier quoted context omitted.

I absolutely remember a ton of pieces about how we all needed to stop using tables (and 1x1 transparent gifs, too) for page layout because CSS was The Right Way

There is always a lot of confusion about this because “tables” can mean different things - it is both a set of structual elements in HTML and a layout model in CSS. CSS is “the right way” to control styling and layout, but that does not mean you can’t use tables. In the early days of the web people used the BLOCKQUOTE element to create margins since this was the only way. When CSS arrived, it became “the right way” t…

But that is the point. CSS arrived, and people started saying you "just need to distinguish beteen the semantics of" a table "and the layout effect". Back then, the chant of the day was, "blood for the blood god, tabular data for the god, layout for the CSS god".

And then it spiraled into general "separation of content and presentation" nonsense that, like in any good cult, people believed with their whole hearts, preached to make new converts, then did the opposite because reality demanded it, and couldn't see the problem. CSS Zen Garden notwithstanding, we ended up with div soups (later, semantic div-equivalent soups) inseparable from complex CSS, because form is function; your content is always designed with a particular form in mind.

Post reply on HN