For years, CSS developers have leaned on preprocessors like Sass and Less to do one crucial thing really well: reuse styles. Mixins became second nature – define once, reuse everywhere, stay sane.
And now… it’s finally happening.
CSS itself is growing up and learning how to do mixins natively.
Not someday-maybe-in-theory – actively, intentionally, and publicly.
Let’s talk about what’s coming, why it matters, and why this is one of the most exciting shifts in modern CSS.
The Big News: CSS Is Getting Native Mixins
The CSS Working Group is actively working on a specification that introduces native CSS mixins and custom functions. That means reusable blocks of styles – without Sass, without build steps, without preprocessing.
This work lives in an official W3C draft and includes concepts like:
@mixin– define reusable style blocks@apply– apply them where needed@function– generate reusable, dynamic values
In other words:
CSS is becoming more expressive, modular, and powerful on its own.
What Native CSS Mixins Look Like
Here’s the kind of syntax the spec is exploring:
@mixin --center {
display: flex;
justify-content: center;
align-items: center;
}
.card {
@apply --center;
}
If that feels instantly familiar, that’s the point. Rather than declaring display, justify-content, align-items on 30+ elements – just add @apply --center;
It reads cleanly.
It’s explicit.
And it stays inside CSS – no compilation step required.
What’s Available Right Now
Let’s be clear (and honest):
Available Today
- CSS custom properties (variables)
- Early experimentation with CSS custom functions in some browsers
Not Ready for Production Yet
@mixinand@applyare still in draft- No stable browser support across Chrome, Safari, or Firefox
- Some features may appear behind flags or in experimental builds first
This is not a “use it in prod tomorrow” situation – yet.
Why This Is a Big Deal
Native CSS mixins aren’t just a convenience feature. They represent a deeper shift:
1. CSS Is Reducing Its Dependency on Tooling
For many projects, preprocessors exist mainly to paper over gaps in CSS. Every time CSS closes one of those gaps, the platform itself gets stronger.
2. Better Performance and Simpler Pipelines
No compilation step.
No generated output to debug.
No mismatch between authored CSS and shipped CSS.
What you write is what the browser runs.
3. A More Cohesive Mental Model
Design tokens, layout patterns, and reusable behaviors can live directly in CSS – alongside cascade layers, container queries, and modern selectors.
This is CSS becoming a real programming environment – on its own terms.
So… Should You Stop Using Sass?
Not yet.
Preprocessors still offer:
- Control structures (
@if, loops) - File-level composition
- Mature ecosystems
But this does feel like the beginning of a transition, not the end of one.
Much like how CSS Grid eventually replaced layout frameworks, native mixins may gradually reduce the need for preprocessors – especially for teams that value simplicity and longevity.
The Bigger Picture
Between:
- Cascade Layers (
@layer) - Container Queries
- Modern color spaces
- Custom properties
- Native functions and (soon) mixins
CSS is quietly becoming one of the most thoughtfully designed languages on the web.
Not flashy.
Not trendy.
Just… better.