News for hackers. Stuff that matters.
Re:Show HN: A front-end visual development tool for React ap... by karatestomp on Monday March 02, 2020 @01:02PM (#22466929)
Confession time: if I'm doing something quick and disposable in raw HTML I still just throw in a <center> tag, because I can't be bothered to screw with CSS centering when I need something to just work, and right now.
Re:Show HN: A front-end visual development tool for React ap... by antonkm on Monday March 02, 2020 @02:12PM (#22467702)
Why not: .center { display: flex; justify-content: center; align-items: center; } ?
Re:Show HN: A front-end visual development tool for React ap... by karatestomp on Monday March 02, 2020 @02:23PM (#22467827)
Because I learned <center> like 20 years ago and it still works, while some of that I've only been exposed to in the last couple years (multiple "this is the right way to center" notions have come and gone since trusty ol' <center> became "bad") and I'd have much lower confidence it'd look the same in my browser as another.

[EDIT] I'm talking about situations like "we need an ugly informational page here for an hour" and all or some part of it would look better centered, or if I'm throwing up a placeholder page on a personal site. Those kinds of things, I'm not gonna google "what's the correct 2020 CSS to do what <center> does" and end up with a bunch of caveats and gotchas when I could just <center> and move on with my life.

Re:Show HN: A front-end visual development tool for React ap... by tmpz22 on Tuesday March 03, 2020 @01:25AM (#22472285)
The year is 2047, the ugly informational page is now a sprawling social network platform and is still in production.
Re:Show HN: A front-end visual development tool for React ap... by shaunxcode on Tuesday March 03, 2020 @02:08AM (#22472448)
And the latest browsers have finally finished implementing the 3D parallaxing layout system which has finally overtaken the other 6 layout systems. It takes a few more lines but it guarantees the compositing for AR is consistent regardless of surface. Meanwhile the center tag actually still just works.