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

But can't you do .selector:not(:last-child) ? Or .selector + .selector ? Both of these seem clearer than adding an extra property just to handle this case.

Like, I understand the situation, I've been in that place plenty of times. But I've never felt in want of a solution there.



I often use the so-called "lobotomized owl selector" (* + *) in the reset I use for my own internal tools. More specifically:

    * {
      margin: 0;
      padding: 0;
    }

    * + * {
      margin-top: 1em;
    }




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

Search: