Skip to main content

token-lookup

Find the matching Fluent UI design token for a hardcoded CSS value (color, spacing, font size, border radius, shadow)

소스 정보

저장소
microsoft/fluentui
최근 소스 활동
2026년 4월 20일 14:10
감지된 SKILL.md 언어
영어
스타
20,366
포크
2,953

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
token-lookup
description
Find the matching Fluent UI design token for a hardcoded CSS value (color, spacing, font size, border radius, shadow)
argument-hint
<css-value>
allowed-tools
Read Grep Glob
# Design Token Lookup Find the correct `@fluentui/react-theme` design token for the hardcoded value **$ARGUMENTS**. ## Steps 1. **Identify the value category:** - Hex color / rgb / named color → color tokens - px/rem spacing → spacing tokens - px/rem font size → font size tokens - px/rem border radius → border radius tokens - Font weight (400, 600, bold) → font weight tokens - Box shadow → shadow tokens - Border width → stroke width tokens - Duration (ms/s) → duration tokens 2. **Search the theme source** for matching values: ``` packages/react-components/react-theme/library/src/ ``` Look in the relevant theme files (e.g., `colorPalette*.ts`, `global/`, `alias/`) to find tokens that map to the given value. 3. **Return the token name and usage:** ```tsx // Instead of: color: '#0078d4' // Use: import { tokens } from '@fluentui/react-theme'; color: tokens.colorBrandBackground; ``` 4. **If no exact match exists**, suggest the closest semantic token and explain the difference. Refer to [docs/architecture/design-tokens.md](docs/architecture/design-tokens.md) for token categories. ## Common Mappings | Hardcoded | Token | | ------------------- | -------------------------------------------------------- | | `#0078d4` | `tokens.colorBrandBackground` | | `#323130` | `tokens.colorNeutralForeground1` | | `#ffffff` | `tokens.colorNeutralBackground1` | | `4px` border-radius | `tokens.borderRadiusMedium` | | `8px` padding | `tokens.spacingHorizontalS` or `tokens.spacingVerticalS` | | `14px` font-size | `tokens.fontSizeBase300` | | `600` font-weight | `tokens.fontWeightSemibold` | These are approximate — always verify against the actual theme source.
GitHub에서 보기