4 ms·
It's a decent idea, but it feels like it would have been more useful a decade ago. With modern CSS you can typically handle separators with a single selector a
by Pikamander2 2y ago
It's a decent idea, but it feels like it would have been more useful a decade ago.
With modern CSS you can typically handle separators with a single selector and property like:
.things .thing:not(:last-child)
{
border-bottom: 1px solid gray;
}
They touch on this in the article but I feel like they're overselling the frequency of edge cases.
- micromacrofoot 2y agothey aren't really edge cases, once you do this you add 1px to the layout unevenly - I run into this frustration with grid all the time
- poncho_romero 2y agoAs they say in the article, your solution doesn’t work for even moderately complex layouts. If you want to add a space between elements, margin works wonderfully until those elements can wrap. Gap was introduced because regardless of what happens, there will always be a space between elements. Your solution fails to address the situation gap was introduced to fill.
- somishere 2y agoAlso doesn't really work when e.g. flex items are set to wrap
- madeofpalk 2y agoDoes this work in a grid?