Replies: 2 comments
-
|
We won't discuss this further for now, but I think we should keep it in mind as an output format. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Update (March 2026): Added Relationship to Spectrum Design Data Specification and discussion links; DTCG export should follow resolved cascade semantics when built. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[DRAFT RFC] DTCG Format as Additional Release Output
Summary
Add Design Tokens Community Group (DTCG) 2025.10 format as an additional output format in the
dist/directory during the release process, alongside the existing Spectrum token format.Motivation
Problem Statement
Current State
Spectrum tokens currently use a custom format:
valueproperty (not$value)$schemaproperty pointing to Adobe schemas (not$type)uuid,private,component, etc.dist/json/variables.jsonOpportunity
The new Resolver Module (2025.10) addresses multi-context token management (themes, platforms, scales) - highly relevant to our multi-platform needs (iOS, Android, Web, Qt, Drover).
Detailed Design
Output Structure
Publish DTCG format to new
dist/dtcg/directory:Token Transformation
Current Format:
{ "white": { "$schema": "https://opensource.adobe.com/spectrum-tokens/schemas/token-types/color.json", "value": "rgb(255, 255, 255)", "uuid": "9b799da8-2130-417e-b7ee-5e1154a89837", "private": true } }DTCG Format:
{ "white": { "$type": "color", "$value": "rgb(255, 255, 255)", "$extensions": { "com.adobe.spectrum": { "uuid": "9b799da8-2130-417e-b7ee-5e1154a89837", "private": true } } } }Transformation Rules
value→$value$schemaURL →$typecolor.json→"color"dimension.json→"dimension"font-family.json→"fontFamily"$extensions.com.adobe.spectrum:uuid,private,component,deprecated,deprecated_comment{token-name}→{token-name}(same syntax, different property)Resolver Document
Create
resolver.jsondemonstrating theme structure (light/dark):{ "version": "2025-11-01", "name": "Spectrum Design Tokens", "description": "Adobe Spectrum Design System tokens", "sets": { "foundation": { "description": "Base tokens (color, typography, layout)", "sources": [ { "$ref": "color-palette.json" }, { "$ref": "typography.json" }, { "$ref": "layout.json" } ] }, "semantic": { "sources": [{ "$ref": "semantic-color-palette.json" }] }, "components": { "sources": [ { "$ref": "color-component.json" }, { "$ref": "layout-component.json" } ] } }, "modifiers": { "theme": { "description": "Color theme variations", "contexts": { "light": [{ "$ref": "color-aliases.json" }] }, "default": "light" } }, "resolutionOrder": [ { "$ref": "#/sets/foundation" }, { "$ref": "#/sets/semantic" }, { "$ref": "#/sets/components" }, { "$ref": "#/modifiers/theme" } ] }Package Exports
Update
packages/tokens/package.json:{ "exports": { ".": "./index.js", "./json": "./dist/json/variables.json", "./dtcg": "./dist/dtcg/tokens.json", "./dtcg/*": "./dist/dtcg/*.json", "./dtcg/resolver": "./dist/dtcg/resolver.json" } }Implementation Approach
Create new tool:
tools/dtcg-transformer/Benefits
Drawbacks
Alternatives Considered
1. Replace Current Format with DTCG
Rejected: Breaking change affecting all 6+ implementation teams
2. Wait for DTCG Tooling to Mature
Rejected: Publishing as additional format allows us to be ready when ecosystem matures
3. Transform Only on Request
Rejected: Better to provide consistent, tested output than require consumers to transform
4. Internal Format Only
Rejected: Limited value if not published
Adoption Strategy
Phase 1: Implementation
Phase 2: Validation
Phase 3: Evolution
Migration Path for Consumers
Existing consumers: No changes required
New consumers: Choose format based on needs:
@adobe/spectrum-tokens/json- Current format (stable, documented)@adobe/spectrum-tokens/dtcg- DTCG format (standards-based, emerging)Validation
Open Questions
Should we include all 8 source files or start with a subset?
Should resolver demonstrate theme variations or just structure?
Should we wait for official DTCG JSON Schema?
Package size impact?
Consumer demand?
Success Criteria
Relationship to Spectrum Design Data Specification
This RFC is tangential to the core spec: it proposes an additional consumer-facing output (DTCG) and does not replace Spectrum’s canonical authoring format. When implemented, DTCG export should reflect resolved token data — including cascade / multi-dimensional behavior described in RFC #646 and platform resolution in RFC #715.
References
Beta Was this translation helpful? Give feedback.
All reactions