What happened
export --format dtcg emits typography tokens that are missing two of the five properties the DTCG typography value schema marks as required, so the output does not validate against the schema it declares in its own $schema field.
Reproduction
Any spec with a typography section — here olmo-earth/DESIGN.md from allenai/design.md:
npx @google/design.md@0.4.0 export --format dtcg olmo-earth/DESIGN.md | jq '.typography["body-md"]'
{
"$type": "typography",
"$value": {
"fontFamily": "Manrope, Arial, sans-serif",
"fontSize": { "value": 16, "unit": "px" },
"fontWeight": 400
}
}
The source frontmatter for that role is:
body-md:
fontFamily: "{typography.font-body}"
fontSize: 16px
fontWeight: 400
lineHeight: 1.6
Why it's a problem
The emitted document declares "$schema": "https://www.designtokens.org/schemas/2025.10/format.json". That schema's typography value definition:
properties: fontFamily, fontSize, fontWeight, letterSpacing, lineHeight
required: fontFamily, fontSize, fontWeight, letterSpacing, lineHeight
additionalProperties: false
All five are required. The export emits three, so every typography token fails validation — 10 of 10 in the spec above, each missing letterSpacing and lineHeight.
lineHeight is the one that bites in practice: it's present in the source frontmatter and silently dropped, so a consumer round-tripping through DTCG loses it. (letterSpacing isn't in the DESIGN.md format at all, so it has no source value — worth deciding whether to emit a default, omit the $type, or target a profile that doesn't require it.)
Suggested fixes, in order of preference
- Emit
lineHeight from the frontmatter, and emit letterSpacing with an explicit default ("0" / {value: 0, unit: "px"}) so the token validates.
- If a required property genuinely has no source value, drop
$type: "typography" for that token and emit the sub-values as a plain group — invalid-by-omission is worse than untyped.
- Failing either, stop advertising the 2025.10
$schema in the output, so downstream validators don't reject a file that claims conformance.
Happy to send a PR for option 1 if that's the direction you'd want.
Environment
@google/design.md@0.4.0, Node 25.2.1, macOS.
What happened
export --format dtcgemits typography tokens that are missing two of the five properties the DTCG typography value schema marks as required, so the output does not validate against the schema it declares in its own$schemafield.Reproduction
Any spec with a typography section — here
olmo-earth/DESIGN.mdfrom allenai/design.md:{ "$type": "typography", "$value": { "fontFamily": "Manrope, Arial, sans-serif", "fontSize": { "value": 16, "unit": "px" }, "fontWeight": 400 } }The source frontmatter for that role is:
Why it's a problem
The emitted document declares
"$schema": "https://www.designtokens.org/schemas/2025.10/format.json". That schema's typography value definition:All five are required. The export emits three, so every typography token fails validation — 10 of 10 in the spec above, each missing
letterSpacingandlineHeight.lineHeightis the one that bites in practice: it's present in the source frontmatter and silently dropped, so a consumer round-tripping through DTCG loses it. (letterSpacingisn't in the DESIGN.md format at all, so it has no source value — worth deciding whether to emit a default, omit the$type, or target a profile that doesn't require it.)Suggested fixes, in order of preference
lineHeightfrom the frontmatter, and emitletterSpacingwith an explicit default ("0"/{value: 0, unit: "px"}) so the token validates.$type: "typography"for that token and emit the sub-values as a plain group — invalid-by-omission is worse than untyped.$schemain the output, so downstream validators don't reject a file that claims conformance.Happy to send a PR for option 1 if that's the direction you'd want.
Environment
@google/design.md@0.4.0, Node 25.2.1, macOS.