feat(style): compose generated class states
Add CssClass/CssClasses with/with_if helpers so nested partial view data can compose generated CSS constants without ad hoc class strings. req: style/003 req: component/003
This commit is contained in:
+1
-1
@@ -860,7 +860,7 @@ All forms support returning `impl IntoEffect` and compose through tuples.
|
||||
002 Generated class constants are ergonomic references only: they do not create a CSS framework, require a framework project structure, or make dynamic class expressions compile-time facts. Unknown Rust class references fail by normal Rust name resolution when the generated constant is absent. [north_star]
|
||||
|
||||
### req: style/003
|
||||
003 When a hemplate dynamic class attribute needs more than one class token, Rust passes a displayable list of generated `CssClass` values as view data. Rust should not assemble ad hoc class strings for known style tokens. [north_star]
|
||||
003 When a hemplate dynamic class attribute needs more than one class token, Rust passes a displayable list of generated `CssClass` values as view data. Conditional state classes should compose from generated constants with boring Rust helpers such as `classes::card.with_if(selected, classes::is_selected)`. Rust should not assemble ad hoc class strings for known style tokens. [north_star]
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user