:nth-child(), :has(), and other newer pseudo classes, etc. In addition, I also use CSS modules at work where (if I understand correctly) this encapsulates css to specific components/pages. <main class="hero">
<div class="hero__content">
<h1 class="hero__title">Lorem ipsum dolor sit amet.</h1>
<p class="hero__text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
</div>
</main>css
main {
width: min(90%, 1200px);
div {
padding: 1rem;
h1 {
color: white;
}
p {
color: gray;
}
}
}