Regarding the performance, the Owl selector uses the + that will search for the adjacent element. So, the second universal selector * will not hit performance. It would have the same performance of a single universal selector.
I always use it together with a > that will search only for the first child, so it impact less performance.
So, for example, to add a left-margin for all the items (except the first) in a row:
Cool, great to know that it helped!
I learned it when I was trying to understand why stylelint complains about having two universal selectors together. Then I found this link: github.com/stylelint/stylelint/iss...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Regarding the performance, the Owl selector uses the
+
that will search for the adjacent element. So, the second universal selector*
will not hit performance. It would have the same performance of a single universal selector.I always use it together with a
>
that will search only for the first child, so it impact less performance.So, for example, to add a left-margin for all the items (except the first) in a row:
There is a good explanation about performance here: github.com/stylelint/stylelint/iss...
You have no idea how well timed your comment is for me ;). I had a colleague asking me about its performance just af few days ago!
I agree the usage with the
>
or at least a specific class before it that you know it is not extremely nested.Cool, great to know that it helped!
I learned it when I was trying to understand why stylelint complains about having two universal selectors together. Then I found this link: github.com/stylelint/stylelint/iss...