Перейти до основного вмісту
← 🎨 CSS as a design system·Модуль B9 · Урок 1
ЗавданняBuild the full token system at :root: 10 color tokens (--primary, --primary-fg, --danger, --success, --bg, --surface, --text, --text-muted, --border, --accent), 6 spacing tokens (--space-xs to --space-2xl), 4 type tokens (--font-sans, --font-mono, --text-base, --text-lg), 4 radii (--radius-sm, --radius-md, --radius-lg, --radius-pill), 3 shadows (--shadow-sm, --shadow-md, --shadow-lg), 3 motion (--ease-out, --duration-fast, --duration-base). Use them on body + a .demo div showing 3 things: text in --text, bg --surface, border --border + padding --space-md, border-radius --radius-md, shadow --shadow-md.

Capstone 1: бібліотека маркерів дизайну

200 XP14 min
Теорія

The foundation every component depends on

A complete token set covering everything you need to style a real product. This is the file every other component IMPORTS via @layer tokens.

The 6 categories of tokens:

  1. Colors — primary palette + semantic (text, bg, border, danger, success).
  2. Spacing — 4/8/12/16/24/32/48/64 scale.
  3. Typography — font-family, sizes via modular scale, line-heights.
  4. Radii — 4/8/12/16 + pill (999px).
  5. Shadows — sm/md/lg with double-shadow technique.
  6. Animation — durations + easings.

Once these are defined, EVERY component is just a recombination of tokens.

🔒

Зареєструйся щоб кодувати

Теорія відкрита всім. Інтерактивний редактор, живий перегляд і перевірка відкриваються з 7-денним безкоштовним trial — потрібна картка, скасування у будь-який час.

Реєстрація — безкоштовний trial →

Перші 10 уроків у кожному треку — безкоштовні. Картка не потрібна.

← НазадНаступний урок →

Отримуй одну пораду з Python чи вебу — щодня поштою

Коротко, без води, без спаму. Відписка — в один клік.