Reusable Design Tokens with Stylus Mixins
Use Stylus mixins to centralize spacing, color, and radius values so changing one token updates every component at build time.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Stylus mixins to centralize spacing, color, and radius values so changing one token updates every component at build time.
Centralize button markup with Pug mixins and &attributes to keep server‑rendered templates DRY while safely handling attribute merging.
Stop copying button markup across Pug templates. Mixins with parameters and block slots let you define a UI component once and reuse it with different labels, variants, and caller-supplied content.
Learn how to use Sass mixins with @content to keep component styles DRY while avoiding CSS bloat. Read a concrete example, trade‑offs, and best practices for reusable component styling.
A decision guide for Less 3.x theme systems: compare parametric mixins with default guards against fixed-arity mixins and value-map functions, with a concrete compilation and validation workflow.
Less mixin guards evaluate conditions at compile time, letting you swap style blocks without runtime overhead. Here is how to use them for responsive, context-aware CSS.
Learn how Less parametric mixins—using defaults, pattern matching, and guards—let you generate reusable, theme‑aware CSS without duplication.
Discover how to eliminate repetitive vendor prefixes in your stylesheets by using Stylus transparent mixins, keeping source code clean while still supporting older browsers.
Learn how Stylus transparent mixins let you reuse CSS property groups without generating extra selectors, keeping your stylesheet DRY and zero‑output when used as‑is.