Skip to content

Comment on Show HN: CSS Speedrun – A small game to test and improve your CSS knowledge

Comments

I used the child combinator (>) and adjacent sibling combinator (+) a lot. I think these aren't used much in real-world code?

I personally use them a lot. `+` is very useful to create separators, e.g.:

    p + p {
      border-top: 1px;
    }
I also like to use `>` as much as possible instead of the implicit ` ` child selector, I find it more robust and less surprising.

I rarely use `~` though, but it has its uses.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.