Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


As 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.


Also doesn't really work when e.g. flex items are set to wrap


they 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


Does this work in a grid?




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

Search: