v0.6.6

Legacy token migration

LEGACY: use this contract with deployed versions that do not yet support design.tokens. You may also keep it after upgrading: the new runtime retains compatibility indefinitely.

The category-based design contract remains supported indefinitely until an explicit removal decision is communicated to consumers. New configuration must use design.tokens; the legacy groups are compatibility input, not equivalent canonical options.

Resolution priority

Values are applied in this order:

  1. Consents domain token defaults.
  2. Resolved legacy category overrides.
  3. Canonical design.tokens overrides.

A canonical override therefore wins over every legacy alias that targets the same domain token. If the canonical value is invalid, it is discarded and the already resolved legacy value remains.

Legacy warnings are always emitted with the [Consents Theme] prefix. They are grouped in one console message and deduplicated by diagnostic code and configuration path; no production environment flag is required.

Scalar aliases

One legacy key can feed several domain tokens. Migrate each target separately when those usages need to diverge.

Legacy pathCanonical target or targets
design.color.background-neutral-primarycomponent-background-color
design.color.background-surface-defaultheader-background-color, footer-background-color, parent-statement-background-color, language-selector-menu-background-color, dialog-background-color
design.color.background-button-defaultfooter-button-background-color
design.color.background-button-hoverfooter-button-hover-background-color
design.color.background-button-pressedfooter-button-pressed-background-color
design.color.background-semantic-critical-primaryvalidation-alert-background-color
design.color.text-neutral-primarytitle-color, description-color, language-selector-text-color, parent-statement-text-color, parent-statement-description-color, child-statement-text-color, child-statement-description-color, dialog-text-color
design.color.text-button-inversefooter-button-text-color
design.color.text-semantic-critical-primaryvalidation-alert-text-color
design.color.icon-neutral-primarycollapse-button-icon-color, language-selector-icon-color
design.color.icon-neutral-secondarystatement-help-icon-color, checkbox-unchecked-icon-color
design.color.icon-button-primarycheckbox-checked-icon-color
design.color.icon-semantic-critical-primaryvalidation-alert-icon-color
design.color.border-neutral-primarystatement-card-border-color
design.color.border-neutral-secondarycontainer-border-color, statement-divider-color
design.spacing.spacing-global-padding-xglobal-padding-x
design.spacing.spacing-global-padding-yglobal-padding-y
design.spacing.spacing-section-gapsection-gap, info-message-padding-y
design.spacing.spacing-statement-vertical-gapstatement-description-gap
design.spacing.spacing-header-padding-xheader-padding-x
design.spacing.spacing-header-padding-topheader-padding-top
design.spacing.spacing-header-padding-bottomheader-padding-bottom
design.spacing.spacing-header-content-gapheader-content-gap
design.spacing.spacing-statement-parent-padding-xparent-statement-padding-x
design.spacing.spacing-statement-parent-padding-yparent-statement-padding-y
design.spacing.spacing-statement-parent-vertical-gapparent-statement-description-gap
design.spacing.spacing-statement-child-padding-xchild-statement-padding-x
design.spacing.spacing-statement-child-padding-ychild-statement-padding-y
design.spacing.spacing-statement-child-vertical-gapchild-statement-description-gap
design.spacing.spacing-statement-child-indentchild-statement-indent
design.spacing.spacing-statement-box-gapstatement-list-gap
design.spacing.spacing-statement-box-padding-xstatement-list-padding-x
design.spacing.spacing-statement-help-icon-sizestatement-help-icon-size
design.spacing.spacing-footer-padding-xfooter-padding-x
design.spacing.spacing-footer-padding-yfooter-padding-y
design.spacing.spacing-footer-section-gapfooter-section-gap
design.spacing.spacing-alert-padding-xvalidation-alert-padding-x
design.spacing.spacing-alert-padding-yvalidation-alert-padding-y
design.spacing.spacing-button-desktop-padding-xfooter-button-desktop-padding-x
design.spacing.spacing-button-padding-yfooter-button-padding-y
design.spacing.spacing-dialog-paddingdialog-padding
design.spacing.spacing-dialog-padding-xdialog-padding-x
design.spacing.spacing-dialog-padding-ydialog-padding-y
design.spacing.spacing-dialog-offsetdialog-popper-offset
design.spacing.spacing-language-selector-gaplanguage-selector-flag-label-gap
design.radius.radius-globalglobal-radius
design.radius.radius-buttonfooter-button-radius
design.radius.radius-statement-boxstatement-card-radius
design.radius.radius-menulanguage-selector-menu-radius
design.radius.radius-dialogdialog-popper-radius
design.radius.radius-alertvalidation-alert-radius
design.shadows.shadow-statement-boxstatement-card-shadow
design.shadows.shadow-language-selector-menulanguage-selector-menu-shadow
design.shadows.shadow-dialogdialog-popper-shadow
design.border.border-statement-boxstatement-card-border-width
design.border.border-containercontainer-border-width

design.color.text-neutral-secondary still feeds its previous internal MUI usage. It has no canonical fan-out because no public domain use currently represents that content.

The canonical container-background-color and statement-card-background-color remain transparent unless configured directly. The broad legacy background aliases do not make these new surfaces opaque.

Typography aliases

For each group below, replace {property} with family, size, weight, lineheight or letterspacing.

Legacy token patternCanonical target or targets
headings-h4-{property}title-typography
headings-h6-{property}info-message-typography
base-regular-{property}language-selector-text-typography, parent-statement-description-typography, child-statement-description-typography, validation-alert-typography
base-medium-{property}child-statement-text-typography, footer-button-typography
body-medium-{property}parent-statement-text-typography
typography-base-familyEvery public typography domain token

Top-level legacy typography values apply globally. design.typography.xs maps to mobile and design.typography.xl maps to desktop. Other legacy breakpoint blocks have no effect.

The five former properties remain available only to legacy payloads. When migrating, select a complete semantic style; the canonical API only allows its family to be overridden:

json

{
  "design": {
    "tokens": {
      "title-typography": {
        "style": "h4",
        "family": "Inter",
        "desktop": {
          "style": "h3"
        },
        "mobile": {
          "style": "h5",
          "family": "Menlo"
        }
      }
    }
  }
}

See Token validations for the limits that still apply to the former typography properties.

Deprecated keys without effect

These known public keys are retained so existing payloads remain accepted, but they do not affect the rendered component:

  • design.spacing.spacing-dialog-section-gap
  • design.spacing.spacing-dialog-header-gap

design.components, unknown category keys, unknown legacy token names and unsupported legacy typography breakpoints also have no effect. They produce a deduplicated warning.

Migration procedure

  1. Load the existing payload without rewriting it.
  2. Add the corresponding entries under design.tokens.
  3. Compare light/dark and desktop/mobile rendering.
  4. Remove a legacy key only after all of its canonical targets are represented.

The Admin Integration Testing editor preserves loaded legacy groups but edits only canonical domain tokens. Use its JSON editor to remove legacy keys after validating the migration.