From 0f21a197faf753cdc8a355cc4cc940af8e91b703 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Thu, 6 Feb 2025 20:54:43 -0500 Subject: [PATCH] fix: don't use InertElement for `style:` etc. (closes #3554) --- leptos_macro/src/view/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/leptos_macro/src/view/mod.rs b/leptos_macro/src/view/mod.rs index 982a9ce171..cfd97a6011 100644 --- a/leptos_macro/src/view/mod.rs +++ b/leptos_macro/src/view/mod.rs @@ -154,7 +154,12 @@ fn is_inert_element(orig_node: &Node) -> 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 }