Re:CSS Tips
by tshaddox on Monday April 26, 2021 @02:40PM
(#26946288)
place-items is just a shorthand property that takes 2 arguments. The first argument sets the align-items value and the second argument sets the justify-content value. If only one argument is provided (as in this example), it sets both align-items and justify-content to that value.
[ Parent
| on HN ]
Actually, this is technically incorrect. It doesn't set justify-content, it sets justify-items. This is why it works with grid, and not flexbox
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/place-items
I think there's a lot of confusion for most people between justify-content/justify-items and align-content/align-items
Re:CSS Tips
by tenaciousDaniel on Monday April 26, 2021 @02:53PM
(#26946472)
Ah, I see. Thanks!