Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
/* Classic grouping */ h1, h2, h3, h4, h5, h6 { font-family: "Inter", sans-serif; line-height: 1.2; color: #111; } /* :is() — forgiving, inherits highest specificity */ :is(article, section, aside) h2 { border-bottom: 2px solid #e0e0e0; padding-bottom: 0.3em; } /* :where() — zero specificity, easy to override */ :where(ul, ol) { padding-left: 1.5em; margin-bottom: 1em; } /* Nesting with :is() to reduce repetition */ :is(.card, .panel, .modal) :is(h2, h3) { margin-top: 0; color: #1a73e8; } /* :where() for a reset that never fights specificity */ :where(button, [role="button"]) { cursor: pointer; border: none; background: transparent; }
Result
Open