v0.7.0

Token validations

Validation runs after SET_CONFIG and before the configurable theme is rendered. A rejected canonical override is removed independently and its resolved default or legacy value remains. Rendering continues.

DiagnosticBehavior
INVALID_OVERRIDEThe incompatible value or property is discarded
INSUFFICIENT_CONTRAST_AAAThe value is applied, but improving its contrast is recommended
UNKNOWN_TOKENThe unknown token, category or typography property is ignored
LEGACY_OVERRIDEThe legacy value is applied and a migration warning is emitted
LEGACY_NO_EFFECTThe accepted legacy key does not affect rendering

Diagnostics are grouped under the [Consents Theme] console prefix and are not repeated while the same issue remains active. If it is fixed and later occurs again, it is emitted again.

Type compatibility

Each scalar domain token accepts only paths from the matching DS branch.

Domain typeAccepted paths
ColorDS tokens compatible with the usage; valid CSS colors are also accepted
Spacingstyle.semantic.spacing.* and style.primitives.spacing.*, up to 4xl or 80px
Radiusstyle.semantic.radius.* and style.primitives.size.*, except full values
Borderstyle.semantic.border.* and style.primitives.stroke.*
Sizestyle.primitives.size.{400,500,600,800}
Shadowshadow.light.* and shadow.dark.*

Paths for another type, raw numeric values and arbitrary strings are not accepted by the canonical API. Direct CSS values are supported only for color.

Configuration may use the short references shown by the editor, such as primary, sm, 400, thin or md. Compatible fully qualified DS paths remain accepted.

Color and shadow paths are normalized to the active theme mode. A light semantic path in a dark theme resolves through its corresponding dark path when available.

Typography compatibility

A canonical typography override selects one complete style. The object form accepts only style, family, desktop and mobile; breakpoint objects accept style and family. Size, weight, line height and letter spacing always come from the selected style.

Available styles depend on the domain token:

  • title-typography: h1 through h6 styles.
  • footer-button-typography: base, md and xs button styles.
  • Other public tokens: base-*, md-*, sm-* and xs-* body styles.

The family accepts only the Inter and Menlo primitives. An incompatible property or style is discarded independently and the previously resolved value remains.

Contrast

Contrast checks run when either side of one of these canonical pairs is overridden:

ForegroundBackgroundRule
title-colorheader-background-colorLarge text
description-colorheader-background-colorNormal text
language-selector-text-colorlanguage-selector-menu-background-colorNormal text
parent-statement-text-colorparent-statement-background-colorNormal text
parent-statement-description-colorparent-statement-background-colorNormal text
footer-button-text-colorfooter-button-background-colorNormal text
footer-button-text-colorfooter-button-hover-background-colorNormal text
footer-button-text-colorfooter-button-pressed-background-colorNormal text
validation-alert-text-colorvalidation-alert-background-colorNormal text
validation-alert-icon-colorvalidation-alert-background-colorUI/large
dialog-text-colordialog-background-colorNormal text

Normal text must meet WCAG AA 4.5:1. Large text and UI uses must meet 3:1. If a pair does not meet AA, the foreground canonical override is discarded when present; otherwise the background override is discarded. If it meets AA but not AAA, the value is applied and INSUFFICIENT_CONTRAST_AAA is emitted. Validation then runs again until no failing configured pair remains.

Common opaque CSS formats are supported, including hexadecimal, rgb(), hsl() and named colors. A translucent foreground is composited over an opaque background before contrast is calculated. Decorative borders are not blocked by contrast validation.

Legacy validation

Legacy categories keep their previous accepted raw values and sanitizer behavior so existing payloads continue to work. They are adapted to domain tokens after legacy resolution.

The compatibility-only legacy rules are:

  • All five former typography properties remain accepted. Font size must be between 14px and 40px, and line height cannot be lower than font size.
  • spacing-dialog-padding, spacing-dialog-padding-x and spacing-dialog-padding-y must be at least 8px.
  • spacing-statement-help-icon-size accepts 12px through 40px and cannot exceed the lower configured line height of body-medium and base-medium.

In the canonical API, statement-help-icon-size accepts only 400, 500, 600 and 800 (16px through 32px) and does not depend on legacy line height.

Do not use those broader legacy value rules for new configuration. They are retained only for backwards compatibility and do not expand the values accepted by design.tokens.