Appearance
Name Sanitization
All user-provided names (theme, entities, colors, modes) are sanitized before being used in Figma variable paths and collection names. The sanitizeName() function applies these transformations:
- Cyrillic transliteration --
а→a,б→b,ж→zh,щ→sch, etc. Full Russian alphabet supported. - Lowercase --
"My Surface"→"my surface" - Spaces → hyphens --
"my surface"→"my-surface" - Remove invalid characters -- only
a-z,0-9,-,_,/survive - Collapse hyphens --
"a---b"→"a-b" - Trim hyphens -- no leading/trailing hyphens
Examples:
| Input | Sanitized |
|---|---|
"Surfaces" | surfaces |
"Content on Layers" | content-on-layers |
"Фон (основной)" | fon-osnovnoy |
"UI / Brand" | ui/brand |
"--Hello World--" | hello-world |
Duplicate detection also uses sanitizeName() -- two names that sanitize to the same string are flagged as duplicates (e.g., "My Color" and "my-color").