DEV Community

Discussion on: An ode to the CSS owl selector

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

* + *

That's all elements including head and body and we'll everything the find the next sibling of any kind. Despite the facet that the initial * is really slow. I better read this article in full because I'm missing the point at the moment.

Collapse
 
vyckes profile image
Kevin Pennekamp

Regardless of selector performance, I tried to show how such a simple selector can be very powerful, due to it being applied nested. Many other selectors also apply nested, but as they do not rely on having siblings, you could do just a search throughout. Because this selector relies on having siblings, mentally you have to recursively go through the DOM tree to determine the effect of this selector. Recursion is a concept that is sometimes deemed difficult by (starting) developers. Such a simple CSS selector applies a powerful computer science concept, without us even knowing it.

tl;dr:
Its a simple selector that applies a powerful computer science concept, showing the complexity of CSS.