re: An ode to the CSS owl selector VIEW POST

re: * + * 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 *...

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.

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

code of conduct - report abuse