Saltar al contenido
TE738 · Tipos · warning

Propiedad CSS desconocida

Advertencia, nunca un fallo de build. Los nombres de propiedad se comprueban contra una tabla curada que viene con la toolchain (datos estáticos, sin descarga de registro); un casi-acierto vuelve con un "¿quisiste decir?" (distancia de edición ≤ 2). Los nombres que empiezan con `-` — prefijos de proveedor y custom properties `--` — nunca se comprueban, ni tampoco los descriptores de at-rules (el `src` de `@font-face`, …). Una propiedad más nueva que la tabla cuesta un subrayado, nunca un 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.

Véase también

Buscar en Zolo

9 resultados

en