Hacker Newsnew | past | comments | ask | show | jobs | submit | more joestrong's commentslogin

I'd argue that `place-content: center` is better than `place-items: center` as it would handle multiple child elements in a way most people would expect from a simple centering snippet.

place-content will position all the children to the center, which is generally what's desired here.

place-items, would make each child element center itself within its own grid square


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


You beat me to posting this. It's a great video - I often revisit this video for creative inspiration.


There is also a book titled "creativity - a short and cheerful guide"[0] but I haven't yet read it.

[0]: https://www.penguinrandomhouse.com/books/224638/creativity-b...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: