CSS killed another centering hack. 🔥
IP
Visit on X@ipwanciu2.2K followers
25,030 views
CSS killed another centering hack. 🔥
`align-content: center` works on a plain block. No flex, no grid. Baseline since April 2024 (Chrome 123, Firefox 125, Safari 17.4), widely available on Oct 16.
Before this, centering a single item vertically meant turning the box into a flex column.
Now ⤵️ one line.
Comments
Comments from the original post on X (Twitter)
No comments yet
