#todayilearned

by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

CSS Combinators

Posted at — Jul 12, 2019

I’ve used CSS for a little while now but until recently I didn’t know that the formal name for inter-selector operators like the direct child > angle bracket, is a COMBINATOR. It sounds intense, like a ‘90s Front Line Assembly album.

There are four types of combinators, and you can think of them this way:

  1. The Descendant selector (space)
  2. the Selector List
  3. The Direct Child selector (>)
  4. The Immediate, Subsequent Sibling selector (+)
  5. The Subsequent Siblings selector (~)