Skip to content

Main content

Design Token Unitless Length Mismatch Flag Tool

Compare explicit design-token number versus length classifications without parsing units or treating unknown kinds as compatible.

Loading tool…

Description

Distinguish a known number/length token mismatch from an unknown token kind.

Graphic-design metadata distinguishes font metrics, variable-font axes, fill rules, color labels and design-token units. Numeric axis differences and text labels do not render a font or apply a color profile. The source convention must match before comparing metrics or resolving a design-system reference.

Distinguish a known number/length token mismatch from an unknown token kind.

When to use this tool

Use Design Token Unitless Length Mismatch Flag when checking the stated font, color or design-token convention.

How to use the tool and how it works

  1. Enter firstKind, secondKind. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read known, mismatched. Inspect known, mismatched before interpreting the associated values.

Accept number, length or unknown kind for each token. known requires neither unknown; mismatched requires known and unequal kinds.1

Input fieldMeaning and unitsAccepted input
firstKindFirst KindRequired. Text; one of "number", "length", "unknown"; maximum UTF-16 length 8192.
secondKindSecond KindRequired. Text; one of "number", "length", "unknown"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
knownBoth kinds declared number or length.Required. Boolean.
mismatchedTrue only for known unequal kinds; unknown does not count as a mismatch.Required. Boolean.
json
{
  "input": {
    "firstKind": "number",
    "secondKind": "length"
  },
  "output": {
    "known": true,
    "mismatched": true
  }
}

Limitations and assumptions

  • Unknown-versus-known is flagged unknown rather than mismatched; no token value, unit or design-system schema is inspected.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Inspect actual fonts, rendered paths, color profiles and the complete applicable design-system specification for visual or production decisions.

References

  1. Calculation and input contract: graphic-design/design-token-unitless-length-mismatch-flag — tool.io

Similar or alternative tools