V04
Warning
Vocabulary
V04 — A class that is the engine's
A class: naming one of the built-ins' wf-* classes, which brings that built-in's rules with it.
What the compiler said
warning[V04]: `class:` names `wf-btn`, one of the engine's own classes --> src/App.wf:3:5 | 3 | Card(class: "wf-btn") { Text("x") } | ^^^^ = help: `wf-` classes are the built-ins': one added here brings another built-in's rules with it. Name a class of your own, or use the flag that sets the look = docs: https://webfluent.monzeromer.dev/errors/V04
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Classes").h1
Card(class: "wf-btn") { Text("x") }
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Classes").h1
Card(class: "note") { Text("x") }
}
Name a class of your own and style it in a .css file under src/, or use the flag that sets the look you wanted (.primary, .elevated).
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints may lower it:
"lints": { "V04": "off" }
// wf-allow(V04)