Skip to content


Styling: css

I am rebuilding my site with Astro. Should I use any CSS pre-processing? Or are we good with just CSS in 2023?

This meta-record was published on

Decision All in

CSS is awesome. And Astro does a great a job of scoping it to your components, while providing the escape hatch needed for those cases.

Not a pun.

Seriously, it's been a long journey, I know. But it's been more than 2 decades, it had to grow, it had to evolve. We're in 2023, and CSS kind of just works (*) these days.

(*) Almost always


I want to use pure CSS as much as possible, but scoped as in "modules".

With Astro you get, out of the box:

  • zero config PostCSS
  • absolutely scoped modules, you can't even use a ... > *:first-child to override styles on children
  • ability to escape the scoped modules and affect some global styles where it makes sense

Practical. No fuss.

See implementation details in Styling.

⚠️ pending a proper PostCSS configuration. See browser support for more details.

Go back to top of the page