The beauty of CSS mixins

Title “The beauty of CSS mixins” above overlapping code cards with mixin definitions and their use in rules.

Patrick Brosset shows how @mixin and @apply reuse whole blocks of declarations, with typed parameters, default values, nested rules, and media queries inside. With @contents, a mixin wraps the styles passed by the caller, which finally gives us named breakpoints. He also built a Mixin Zen Garden demo where customers theme a white-label site without touching its HTML. For now, mixins work in Chromium behind a flag.

patrickbrosset.com/articles/2026-11-25-the-beauty-of-css-mixins