Rant: spent 4 hours centering one stupid modal, and the answer was 2 lines of grid
Honestly I was ready to throw my laptop out the window last Thursday over a login modal that would not sit in the middle of the screen. I tried absolute positioning with a transform, then flexbox with three nested wrappers, and at one point I had margin auto on a fixed element like a total clown. The thing kept jumping up when the page scrolled and I kept blaming the browser instead of my own mess. After 4 hours and probably 60 live reloads on localhost:3000, I deleted the whole block and used grid with place-items center on the parent. Two lines. It worked in about 10 seconds and I just sat there staring at it. Has anyone else wasted a whole afternoon on centering something that grid solves instantly, or am I the only one?