Overview
This document analyzes the structural patterns between ODS and Abyss token formats, using the button component as a reference implementation. Understanding these patterns is crucial for designing a token conversion strategy.
Token Structure
ODS CTI Example
{ "category": "light", "subcategory": "", "variant": "destructive", "state": "hover", "section": "container", "property": "background-color", "value": "{ds.btnColors.themes.light.destructive.hover.background.color.value}"}Abyss Token Example
{ "type": "color", "category": "surface", "element": "container", "variant": "filled-destructive", "state": "hover", "value": "{web.semantic.color.surface.interactive.standards.hover.default.status.error}"}Mapping Rules
1. Direct 1:1 Mappings
ODS Property -> Abyss Property---------------------------------state -> statevalue -> value2. Property-Based Type Mapping
ODS "property" Value -> Abyss "type" Property-------------------------------------------------------background-color -> colorborder-color -> colorcolor-primary -> colorpadding -> spacingmin-height -> sizingmin-width -> sizing3. Section Mapping
ODS "section" Value -> Abyss Property/Value-------------------------------------------------------container -> element: containerlabel -> element: labelicon-leading -> category: iconicon-trailing -> category: iconicon-only -> characteristic: icon-only4. Variant Transformations
ODS "variant" Value -> Abyss "variant" Value-----------------------------------------------------destructive -> filled-destructiveprimary -> filled-brandtertiary -> text-brand5. Category + Property Combinations
ODS "category" + "property" Properties -> Abyss "category" Property---------------------------------------------------------------------light + border-color -> borderlight + background-color -> surfacelight + color -> textlight + color-primary -> iconExample Mappings
Background Color Token
ODS:{ "category": "light", "property": "background-color", "section": "container", "variant": "destructive", "state": "hover", "value": "{ds.btnColors.themes.light.destructive.hover.background.color.value}"}
Maps to Abyss:{ "type": "color", "category": "surface", "element": "container", "variant": "filled-destructive", "state": "hover", "value": "{web.semantic.color.surface.interactive.standards.hover.default.status.error}"}Icon Color Token
ODS:{ "category": "light", "property": "color-primary", "section": "icon-leading", "variant": "destructive", "state": "hover", "value": "{ds.btnColors.themes.light.destructive.hover.icon.color.primary.value}"}
Maps to Abyss:{ "type": "color", "category": "icon", "variant": "text-destructive", "state": "hover", "value": "{web.semantic.color.icon.interactive.hover.status.error}"}Border Color Token
ODS:{ "category": "light", "property": "border-color", "section": "container", "variant": "destructive", "state": "hover", "value": "{ds.btnColors.themes.light.destructive.hover.border.color.value}"}
Maps to Abyss:{ "type": "color", "category": "border", "variant": "outline-brand", "state": "hover", "value": "{web.semantic.color.border.content.primary}"}