Skip to content

Commit

Permalink
fix: don't use InertElement for style: etc. (closes #3554)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Feb 7, 2025
1 parent 32be3a0 commit 0cf8d2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion leptos_macro/src/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ fn is_inert_element(orig_node: &Node<impl CustomNode>) -> bool {
Some(value) => {
matches!(&value.value, KVAttributeValue::Expr(expr) if {
if let Expr::Lit(lit) = expr {
matches!(&lit.lit, Lit::Str(_))
let key = attr.key.to_string();
if key.starts_with("style:") || key.starts_with("prop:") || key.starts_with("on:") || key.starts_with("use:") || key.starts_with("bind") {
false
} else {
matches!(&lit.lit, Lit::Str(_))
}
} else {
false
}
Expand Down

0 comments on commit 0cf8d2b

Please sign in to comment.