V05
Warning
Vocabulary
V05 — A CSS property no browser knows
A misspelled property — colr: — is ignored by the browser; nothing tells you why the style did not take.
What the compiler said
warning[V05]: `colr` is not a CSS property, so the browser ignores it --> src/App.wf:3:17 | 3 | style { colr: red } | ^^^^ = help: Did you mean `color`? = docs: https://webfluent.monzeromer.dev/errors/V05
Your editor offers this fix: Change to color. wf fix --code V05 applies it to every place it fits.
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Hello") {
style { colr: red }
}
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Hello").h1 {
style { color: red }
}
}
The property the message suggests — here color. A custom
property is written --name.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
Why this rule exists
Warning.
lints may lower it:
"lints": { "V05": "off" }
// wf-allow(V05)