---
title: 'Modern CSS: Native Nesting, Cascade Layers & Container Queries'
description: 'How standard CSS has rendered many preprocessors obsolete with native features.'
subtitle: 'Writing clean, resilient styles without Sass or Less.'
date: '2025-03-27'
lang: 'en'
---

CSS has experienced an incredible renaissance over the last three years. Features that previously mandated preprocessors are now universally supported.

## Native Nesting in Action

```css
.card {
  background-color: var(--card-bg);
  border-radius: 0.75rem;

  & .card-header {
    font-weight: 600;
  }

  &:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
}
```

## Cascade Layers (`@layer`)

Manage specificity cleanly without resorting to `!important`:

```css
@layer reset, base, components, utilities;

@layer components {
  .btn {
    padding: 0.5rem 1rem;
  }
}
```
