Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 52

CSS & Design Systems2 min read

Monorepo tradeoffs for a design system

Monorepos give atomic cross-package changes, shared tooling, and easy local linking; drawbacks include build complexity, CI scaling, and tighter coupling.

CSS & Design Systems2 min read

Component variants with BEM modifier classes

A base block class holds shared styles, modifier classes (block--primary, block--destructive) layer only the differences, and you combine base plus one modifier.

CSS & Design Systems2 min read

Core tokens versus alias semantic tokens

Core tokens are raw values like blue-500; alias tokens reference cores with intent like color-action; semantic aliasing decouples meaning from raw value.

CSS & Design Systems1 min read

CSS transition versus animation

Transitions interpolate between two states triggered by a change; animations use keyframes for multi-step, looping, autonomous motion.

CSS & Design Systems1 min read

CSS Grid versus Flexbox fundamentals

Flexbox is one-dimensional (a single row or column), Grid is two-dimensional (rows and columns together); use Grid for page layout, Flexbox for a toolbar of items.

CSS & Design Systems1 min read

Brand color as a token and CSS custom property

Define a typed color token in JSON, generate a custom property like --color-brand-primary, then reference it with var().

CSS & Design Systems2 min read

Fixing brand color contrast at the system level

Build a tonal palette with known contrast steps, define semantic text-on-surface token pairs that pass AA, and enforce with automated contrast checks.

CSS & Design Systems1 min read

Distributing design tokens across web, iOS, and Android

Keep one source-of-truth JSON, transform with a tool like Style Dictionary, emit per-platform formats (CSS vars, Swift, XML) in CI.

CSS & Design Systems1 min read

Designing a Card component's configurable API

Expose content via composition (slots/children), expose constrained variants as enums, lock spacing and brand tokens.

CSS & Design Systems1 min read

CSS Modules versus BEM for encapsulation

CSS Modules scope via build-time hashed class names automatically; BEM scopes via disciplined human naming with no tooling.

CSS & Design Systems1 min read

Center a div with Flexbox on the parent

Set display flex on parent, justify-content center for the main axis, align-items center for the cross axis.

CSS & Design Systems1 min read

Structure CSS layers for reset, vendor, and components

Declare layer order upfront, place reset earliest, vendor next, your components last so they win.

CSS & Design Systems1 min read

What problem do CSS Cascade Layers solve?

Layers create explicit priority bands, layer order beats specificity inside, and you control override without selector hacks.

CSS & Design Systems1 min read

Cross-platform themeable token system

Tier tokens with semantic theme sets that remap primitives per mode, transform to each platform's theme mechanism, and deliver versioned packages.

CSS & Design Systems1 min read

Structuring docs for multiple audiences

Layer docs by audience, give developers API and code, designers usage and design guidelines, PMs principles and coverage, with shared foundations like tokens and accessibility.

CSS & Design Systems1 min read

Delivering an urgent design system hotfix

Branch from the released tag, apply a minimal fix, add a regression test, ship a patch version, then forward-port to main.

CSS & Design Systems1 min read

Contributing a new component variant

Align with maintainers first, follow guidelines, implement with API and tokens, add stories, docs, and tests, then open a PR for review.

CSS & Design Systems1 min read

Tokens as a single source of truth pipeline

Define tiered tokens in standardized JSON, transform per platform with a build tool, publish versioned packages, and automate in CI.

CSS & Design Systems1 min read

The role of Storybook in a design system

Storybook renders components in isolation across states, serving as living documentation, a development sandbox, and a base for visual and accessibility testing.

CSS & Design Systems1 min read

Clickable card: div onClick versus anchor tag

Use an a tag for navigation; it is focusable, keyboard-activatable, announced as a link, and supports open-in-new-tab; a div onClick loses all of that without manual ARIA work.