DEV Community

Discussion on: CSS coding patterns that give you away as a junior developer.

 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

How so? What's less performant about *+* compared to the other ways you could express it?

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇
  • selects all elements so it parses multiple times to the CSSOM, as more specific a selector is, more performance when applying it. li+li will apply to all li parent elements of another li, where + will apply to any element being parent of whatever other element.