示例工程 47-naming-conventions

47-naming-conventions/app/tokens.css

css · 0.6 KB

运行:命名与作用域

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-brand: #2563eb;
  --color-brand-dark: #1d4ed8;
  --color-brand-soft: #dbeafe;
  --color-green: #16a34a;
  --color-green-soft: #dcfce7;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 8%);
  --shadow-md: 0 8px 24px rgb(15 23 42 / 12%);
}