Detect token drift in a CSS file
tokens_check_driftScans a CSS file for hardcoded hex colors and px values, comparing them to design tokens to identify mismatches and suggest fixes.
Instructions
Scan a CSS file for hardcoded hex colors and px values, and compare each against the design tokens. Values that exactly match a token are reported as 'matched'; values that match no token are reported as 'drift', each with the nearest token as a fix suggestion. Returns { checked_file, matched, drift: [{ value, line, kind, nearest_token, nearest_value }] }. Use this after editing styles to keep code and design tokens in sync.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css_path | Yes | Path to the CSS file to scan |