I'm out of the web development game, but in my day it was still quite possible to vertically center text and icons consistently. You just had to notice it was busted in the first place, and then go in and fix it. It's not a technological problem, or at least not a non-trivial one. The problem is that, if it's off by a couple pixels, the front-end engineer may not notice it, and the designer may not even look at it. O…
No, this was never possible, not in web development. You could do it in one browser on one OS, but then they could be off on another browser on another OS. It's absolutely a technological problem because pixel-perfect rendering and alignment is not part of the HTML/CSS specs, when it comes to how fonts get drawn. The only way to actually get it perfect is to do browser and OS detection and then hand-code a bunch of m…
Hardest problem in computer science: centering things
21–30 of 473 posts
Re: Hardest problem in computer science: centering things
#22First 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.
Incredible, massive, outstand leap from "showing anonymized cursors" to "invading people's privacy"
Re: Hardest problem in computer science: centering things
#23First 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.
As someone who compulsively scrolls, selects and fidgets while reading, it actually made me quite self conscious to realize that other people would be distracted by my all-over-the-place mouse movements.
Re: Hardest problem in computer science: centering things
#24First 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.
Re: Hardest problem in computer science: centering things
#25First 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.
I had to open up devtools to be sure, but yeah, there's a websocket that constantly streams your cursor position up to the server and constantly streams everyone else's cursor positions down to you for rendering. As someone who compulsively scrolls, selects and fidgets while reading, it actually made me quite self conscious to realize that other people would be distracted by my all-over-the-place mouse movements.
Re: Hardest problem in computer science: centering things
#26I’m surprised ‘text-box-trim’ wasn’t mentioned.
It’s a CSS attribute that solves this on the web.
https://caniuse.com/css-text-box-trim
If only browsers would support it.
Until then, here’s a JS alternative.
Re: Hardest problem in computer science: centering things
#27> 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.
Re: Hardest problem in computer science: centering things
#28> That’s exactly why people love web programming so much. There’s always a challenge. LOL, these examples are exactly why I got out of web programming. Thankfully I never had to deal with any of the modern frameworks. I was getting hot flashes just scrolling through this page.
You will want to make sure you work on things that are challenging for the right reasons.
Re: Hardest problem in computer science: centering things
#29Text-Box-Trim I’m surprised ‘text-box-trim’ wasn’t mentioned. It’s a CSS attribute that solves this on the web. https://caniuse.com/css-text-box-trim If only browsers would support it. Until then, here’s a JS alternative. https://seek-oss.github.io/capsize/