Appearance
T2114: Unknown variant value in a selector
Cause
A [data-variant="value"] selector names a value the contract does not declare for that variant, so it could never match.
Example
xml
<contract>
{ "name": "Card", "role": "group", "parts": ["root"], "variants": { "tone": ["neutral", "danger"] } }
</contract>
<template><div class="root"></div></template>
<style>
.root {
&[data-tone='dnager'] {
padding: $space.2;
}
}
</style>What you see
text
ERROR T2114 app/components/Card.tess:7:16
Card.tone has no value "dnager".
Did you mean "danger"?
Run `tessera explain T2114` for details.Fix
Use one of the declared values (the hint suggests the nearest), or add the value to the contract.