Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Clean Up Your CSS with the :is() Pseudo-Class
March 5, 2026
Writing long, repetitive selectors like "header p, main p, footer p" can make your stylesheets feel cluttered and hard to read. You can simplify this significantly using the ":is()" pseudo-class. By writing ":is(header, main, footer) p", you are telling the browser to apply the styles to paragraphs inside any of those elements. It is a great way to group logic together without the bloat, and it handles specificity in a much cleaner way than the old-school comma-separated lists.