Live data from Hacker News

Hardest problem in computer science: centering things

tonsky.me

41–50 of 473 posts

Re: Hardest problem in computer science: centering things

#42

Funny that this doesn’t even mention the actual critical failure of CSS centering: data loss on all items overflowing to the left of the container. Items to the right can be scrolled into view, but items to the left are entirely inaccessible.

Is that any worse than an inability to scroll up, vertically negative, from the initial scroll position?

Re: Hardest problem in computer science: centering things

#43
post #34

The Apple one doesn’t seem fair. You can do the math to center the box but typography with descenders throws everything off. I think if they had centered it “correctly” it would feel off.

I disagreed with a couple of the Apple ones.

The iOS upper right tray stuff looks right how it is, I don't think they were trying to center them vertically with each other. It's treated more like a line of text, with some parts of the icons (outer border of the battery, rounded corners of the LTE bars) dropping below baseline like descenders.

And the Business login screen pushes the centering around because it assigns different visual weight to the UI element versus its label. When the label is on the left (text fields) the centerline shifts right, and when the label is on the right (checkbox) the centerline shifts left. The elements that stand alone (building circle, Business text, Sign In button, Need help signing in text) all keep a consistent line. If you ignore that visual weight and just center them, you probably end up with it looking wrong like a triangle with its bounding box centered in a circle does.

The QuickTime button is just bad though.

Re: Hardest problem in computer science: centering things

#44
post #14

> don’t ask why you need to remember four words instead of just horizontal/vertical, it’s still better than before The reason is "display: flex" can be a column or row. The "align-items" property describes alignment along the axis, so vertical for column and horizontal for row. The "justify-content" property is the other direction.

The other CSS terms for this are block and inline, as in padding-inline-start and padding-block-end. Whether it’s the top/bottom/left/right edge is determined by flow direction. iOS/SwiftUI calls the inline directions leading and trailing, but I’m not sure how it works with vertical type

Technically, block and inline dimensions are defined with respect to the direction of the text. The terms used in the CSS spec to refer to the direction of justify-content and align-items are the main axis and the cross axis, respectively.

Re: Hardest problem in computer science: centering things

#45

First time probably ever that I've had to disable Javascript because of the creepy and distracting mouse thing. It really feels like you're invading other people's privacy, and if it doesn't, having things randomly move across your field of vision makes it difficult to read.

It's a joke, no?

Re: Hardest problem in computer science: centering things

#46
post #22

First time probably ever that I've had to disable Javascript because of the creepy and distracting mouse thing. It really feels like you're invading other people's privacy, and if it doesn't, having things randomly move across your field of vision makes it difficult to read.

> It really feels like you're invading other people's privacy Incredible, massive, outstand leap from "showing anonymized cursors" to "invading people's privacy"

The word “feels” is a cheatcode for enabling bunnyhop leaps from one idea to a distant and enticing destination.

It feels that way, anyway.

Re: Hardest problem in computer science: centering things

#48

First time probably ever that I've had to disable Javascript because of the creepy and distracting mouse thing. It really feels like you're invading other people's privacy, and if it doesn't, having things randomly move across your field of vision makes it difficult to read.

Pretty annoying, but maybe that's what Niki is aiming for?

Re: Hardest problem in computer science: centering things

#50
But is it really worth fixing these things? What do you achieve by spending time and money to fix these details, other than making users slightly less annoyed by your design? Maybe these details are not fixed because they don’t really matter that much. Have you ever stopped using an app because a button or icon was slightly misaligned?
Post reply on HN