ub-css

Map DTCG design tokens to CSS variables with layered cascades and native nesting.

6|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/robert-hoffmann/uncle-bob --skill ub-css
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ub-css
Source: https://github.com/robert-hoffmann/uncle-bob/tree/main/.agents/skills/ub-css
Command: npx skills add https://github.com/robert-hoffmann/uncle-bob --skill ub-css

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

CSS in modern front-end stacks often suffers from maintainability challenges, token governance gaps, and brittle Cascades; this skill provides token-driven design systems, layered cascades, and progressive enhancement to keep styles robust and scalable.

Core Features & Use Cases

  • Token-driven CSS: map design tokens to CSS custom properties and keep semantic token names stable.
  • Layered cascade: explicit @layer order to avoid specificity wars, with global resets and component scopes.
  • Modern features: native nesting, container queries, and safe fallbacks for broad browser support.
  • Use Case: migrate a Vue/Nuxt project from Sass hacks to a token-based design system.

Quick Start

Refactor an existing Vue/Nuxt project to use design tokens mapped to CSS variables, with native nesting and container queries.

Frequently Asked Questions about ub-css

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map design tokens to CSS custom properties in a Vue or Nuxt project?

You map design tokens to CSS custom properties by applying a DTCG token contract that binds semantic token names to CSS variables, ensuring stable styling and scalable design governance within Vue or Nuxt components.

What is the best way to organize CSS cascade layers to avoid specificity wars?

Organizing CSS cascade layers requires defining an explicit @layer order for global resets, component scopes, and utilities, which prevents specificity conflicts and keeps your design system maintainable.

Can I use native CSS nesting and container queries with safe fallbacks for older browsers?

Yes, you can use native CSS nesting and container queries with safe fallbacks by applying progressive enhancement, ensuring broad browser support while modernizing your component styles.

Does this approach work for migrating a component library from Sass to a token-based design system?

Yes, this approach works for migrating a component library from Sass hacks to a token-based design system by replacing them with DTCG token contracts, layered cascades, and native CSS features.

How do I refactor Tailwind styles to use design tokens and cascade layers?

To refactor Tailwind styles with design tokens and cascade layers, you map existing utility configurations to CSS custom properties and enforce an explicit @layer order for robust, scalable styling.