Sass / SCSS
SCSS adds structure: variables, nesting (use carefully), mixins, and partial imports.
Install (Next.js)
bash
npm i -D sassTokens + mixins example
scss
$brand: #2563eb;
$bg: #0b1220;
$radius-md: 12px;
@mixin focusRing($color) {
&:focus-visible {
outline: 2px solid rgba($color, .45);
outline-offset: 2px;
}
}
.btn {
background: $brand;
border-radius: $radius-md;
color: white;
padding: .5rem 1rem;
@include focusRing($brand);
}Avoid over-nesting
- Keep nesting depth to 2–3 levels max.
- Prefer BEM-ish naming for predictable selectors.
Page changelog
Last updated
- 2026-01-18—Initial or baseline update for this page.
Related articles
Configuration
API Reference — Patterns and Generation
How to design, document, and (when possible) auto-generate reference docs from OpenAPI and source code.
Configuration
Tailwind CSS — Utility-First Styling with Production Discipline
Install Tailwind, build consistent design tokens, and ship fast UI with real CSS examples, components, and best practices.
Configuration
Ant Design — Enterprise UI Components for React
A mature enterprise component library. Learn how to install, theme, and use components with predictable layout and form patterns.
Configuration
MUI (Material UI) — Component Library with Theme Tokens
Build consistent UI fast with MUI themes, component overrides, and practical examples for React/Next.js.
Configuration
Styled Components — CSS-in-JS with Real CSS Snippets
Write component-scoped styles with full CSS power, theming, and patterns for scaling safely.
Configuration
Scaling WordPress for High Traffic
Optimize WordPress performance using Redis Object Cache, Varnish, and database replication strategies.
Was this page helpful?