CSS Architecture

Guide CSS architecture with Tailwind, BEM, and design tokens.

Updated Feb 18, 2026
One-click install
npx skills add https://github.com/SamuelSaha/Reqflow --skill css-architecture-samuelsaha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CSS Architecture
Source: https://github.com/SamuelSaha/Reqflow/tree/main/SWARM/skills/frontend/css-architecture
Command: npx skills add https://github.com/SamuelSaha/Reqflow --skill css-architecture-samuelsaha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenges of maintaining consistent, scalable, and performant styling in frontend codebases, preventing styling drift and ensuring design integrity.

Core Features & Use Cases

  • Tailwind CSS Mastery: Deep dives into configuration, custom plugins, and semantic color tokens for efficient theming.
  • BEM Methodology: Guidelines for structuring CSS using the Block, Element, Modifier pattern, especially for legacy codebases or Sass integration.
  • CSS-in-JS Patterns: Examples and best practices for Styled Components and Emotion for component-scoped styling.
  • Design Tokens: Strategies for defining and using CSS variables for colors, spacing, typography, and more, including dark mode support.
  • Style Isolation: Techniques like CSS Modules, Scoped CSS (Vue), and Tailwind's @apply for preventing style conflicts.
  • Use Case: Apply this skill to refactor a project's CSS to use Tailwind with semantic tokens, ensuring all components adhere to the design system and dark mode is seamlessly supported.

Quick Start

Apply the CSS Architecture skill to refactor the project's styling using Tailwind CSS and semantic design tokens.

Frequently Asked Questions about CSS Architecture

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

FAQPage Schema
How do I configure Tailwind CSS with semantic design tokens for dark mode?

You configure Tailwind CSS with semantic design tokens by mapping CSS variables for colors and spacing within the tailwind configuration, ensuring seamless dark mode theming and consistent UI design.

What is the best way to isolate component styles and prevent CSS conflicts?

To isolate component styles and prevent CSS conflicts, use CSS Modules, Vue Scoped CSS, or Tailwind's @apply directive to encapsulate styling locally and maintain strict style boundaries.

When should I use the BEM methodology instead of CSS-in-JS libraries?

Use the BEM methodology instead of CSS-in-JS libraries when structuring legacy codebases or Sass integrations, utilizing the Block, Element, Modifier pattern to ensure maintainability without runtime overhead.

How do Styled Components and Emotion handle component-scoped styling?

Styled Components and Emotion handle component-scoped styling by co-locating styles within JavaScript components, generating unique class names to prevent styling drift and ensure design integrity across scalable frontend codebases.

How do I refactor a project's CSS to use Tailwind and semantic color tokens?

To refactor a project's CSS to use Tailwind and semantic color tokens, replace hardcoded values with CSS variables, update the tailwind configuration, and apply isolated utility classes ensuring all components adhere to the design system.