4 ms·
it's super briefly mentioned in the post, but just want to highlight that you can center in CSS grid with 1 extra line of CSS: .parent { display: gri
by swyx 6y ago
it's super briefly mentioned in the post, but just want to highlight that you can center in CSS grid with 1 extra line of CSS:
.parent {
display: grid;
place-items: center
}
and it's supported everywhere CSS grid is! My biggest TIL of the year.
More 1 liner tricks from Una Kravets here: https://twitter.com/swyx/status/1279674027070504961?s=20 https://twitter.com/swyx/status/1279674027070504961?s=20