3 ms·
This is great. I never knew about the universal selector (*) or the general sibling selector (~). I'm sure I'll learn a few more tricks from this as well, not
by habosa 13y ago
This is great. I never knew about the universal selector (*) or the general sibling selector (~). I'm sure I'll learn a few more tricks from this as well, not finished yet.
- huckyaus 13y agoGoogle[0] and Mozilla[1] both have some information on their developer sites about why avoiding the universal selector is preferable from a performance point of view. I'm yet to find a case that has absolutely required the use of the universal selector. Has anybody else? [0] https://developers.google.com/speed/docs/best-practices/rendering#UseEfficientCSSSelectors https://developers.google.com/speed/docs/best-practices/rend... [1] https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_s...
- jmcgough 13y agoI mostly see the universal selector used for resets (like removing all padding and margins), but it's definitely not frequently used.