3 ms·
> :is(article, aside, nav, section) ... > The :is selector is pretty damn cool. Given the combinatorial nature of these groupings, writing something like this
by nayuki 5y ago
> :is(article, aside, nav, section) ...
> The :is selector is pretty damn cool. Given the combinatorial nature of these groupings, writing something like this in CSS before :is would’ve been insane:
> /* keep going _forever_ */
In this case, there would have been 4^5 = 1024 selectors. Large enough to be annoying to a human, but small enough to be parsed and stored in memory.