规划设计变量与多主题模式配置
根据设计令牌规划变量集合、主题模式及别名映射,提供发布范围、代码同步和旧样式迁移步骤。
完整提示词
<context>
Figma variables hold colour, number, string and boolean values, are grouped into collections, and switch values through modes, which is how one library serves light and dark or several brands. The structure that holds up is two or three collections that mirror the token tiers: primitives (raw palette and scales, hidden from publishing so designers cannot pick them directly), semantic tokens that alias primitives and carry the modes, and optionally component tokens. Modes belong on the semantic collection; putting brand and theme modes on primitives multiplies values and makes aliases hard to trace. Scoping limits where each variable appears (fill, stroke, text, gap, radius), which removes most misuse in the picker. Names with slashes create groups in Figma, and code syntax can be set per platform so Dev Mode shows the real token name engineers use. The number of modes allowed per collection depends on the Figma plan, so a plan with many brands times themes must check its limit. Some properties still need styles rather than variables, such as effects, gradients and composite text styles, though text styles can bind their size, line height, weight and family to variables. Code and Figma drift unless one side is the source of truth and the sync route is explicit.
</context>
<task>
Plan the Figma variables setup for this token set.
<tokens>
{{tokens}}
</tokens>
{{#themes}}
<themes>
{{themes}}
</themes>
{{/themes}}{{#setup}}
<setup>
{{setup}}
</setup>
{{/setup}}
1. **Collections and modes.** Name the collections, what goes in each, and the modes on each. Explain why modes sit where they do. If brands and themes multiply, show the mode count and tell the user to check it against their plan's limit.
2. **Variable list.** A table per collection: variable name (slash-grouped), type, value or alias per mode, and the matching code token name.
3. **Aliasing.** Which semantic variables alias which primitives, and rules for when a component variable is worth adding.
4. **Scoping and publishing.** The scope for each group (for example text colours only on text fill, spacing only on gap and padding), which collections are hidden from publishing, and descriptions to add to variables.
5. **Styles still needed.** Text styles bound to typography variables, effect styles for shadows, and anything else that variables do not cover in this setup.
6. **Code sync.** Choose the source of truth (code or Figma) and the sync route the user's setup allows (export plugin, REST API where their plan permits, or manual review), set code syntax per platform, and describe a check for drift.
7. **Setup steps.** An ordered checklist to build it, including how to migrate existing styles to variables without breaking consumer files.
</task>
<constraints>
- Variable names must match code token names one to one, or the mapping must be listed.
- Do not state specific plan limits or features as facts unless the user gave their plan; tell them what to check.
- Do not invent token values; aliases and proposals are labelled.
{{> output/uncertainty}}
</constraints>
<output_format>
Markdown with the sections from the contract, in order. Variable lists as tables, setup as a numbered checklist. End with Open questions.
</output_format>可替换内容
- {{tokens}}
- {{#themes}}
- {{themes}}
- {{/themes}}
- {{#setup}}
- {{setup}}
- {{/setup}}
- {{> output/uncertainty}}
分类与标签
设计创意、设计系统、设计令牌、多主题配置、设计开发同步