Native CSS nesting
Write related rules together without Sass.
CSS · Native CSS nestingAdvanced
.card {
padding: 1rem;
border-radius: 12px;
background: #fff;
& h3 { margin: 0 0 0.5rem; }
& p { color: #4b5563; }
&:hover { box-shadow: 0 8px 20px rgb(0 0 0 / 0.1); }
&.featured { border: 2px solid #2563eb; }
@media (max-width: 600px) {
padding: 0.75rem;
}
}nesting&selectorsorganization