Pular para o conteúdo
TE738 · Tipos · warning

Propriedade CSS desconhecida

Aviso, nunca falha de build. Nomes de propriedade são checados contra uma tabela curada que vem com a toolchain (dado estático, sem download de registry); um quase-acerto volta com "quis dizer?" (distância de edição ≤ 2). Nomes começando com `-` — prefixos de vendor e custom properties `--` — nunca são checados, nem descritores de at-rule (o `src` de `@font-face`, …). Propriedade mais nova que a tabela custa um sublinhado, nunca um release.

Why this fires

This is a warning, not a hard error — it never fails the build. The compiler parses your style bodies down to declarations, so a property-name typo does not have to wait for DevTools: the name is checked against a curated table shipped with the toolchain (static data in the repository, no registry download), and a near miss comes back with a suggestion (edit distance ≤ 2):

fn Card() -> View {
    <div class="card">
        <style>.card { colr: red }</style>
    </div>
}
// warning[TE738]: unknown CSS property `colr` — did you mean `color`?
//   help: vendor prefixes (`-webkit-*`) and custom properties (`--*`) are never checked

Fixed exemptions

  • Vendor prefixes (-webkit-*, -moz-*, …) and custom properties (--*) are never checked — any name starting with - is exempt before the lookup happens.
  • At-rule descriptors are not properties: the direct declarations of @font-face, @property, @counter-style, @page (src, unicode-range, syntax, …) are exempt. Rules nested inside @media/@supports bodies are checked normally.

Because this is a warning backed by a curated list, a property newer than the table can never break your build — the list is updated with the toolchain, and a false "unknown" costs you a squiggle, not a release.

Fix it

Fix the spelling. If the property is real but newer than the table, ignore the warning (or file an issue so the table catches up).

See also

  • TE735 — selector matches no element of the component.

Veja também

Buscar no Zolo

9 resultados

en