Merge static and dynamic styles (#3950)

* Merge static and dynamic styles

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2025-05-07 14:15:15 -07:00
1 parent 68c7b903d5
commit ad63d529fd
6 files changed
+47 -3

No files matched your search

+15
View File
@@ -63,6 +63,7 @@ fn app() -> Element {
OnMounted {}
WebSysClosure {}
DocumentElements {}
MergeStyles {}
SelectMultiple {}
}
}
@@ -156,6 +157,20 @@ fn DocumentElements() -> Element {
}
}
// Regression test for https://github.com/DioxusLabs/dioxus/issues/3887
#[component]
fn MergeStyles() -> Element {
let px = 100;
rsx! {
div {
id: "merge-styles-div",
style: "width: {px}px; height: {px}px",
background_color: "red",
}
}
}
// Select elements have odd default behavior when you set the multiple attribute after mounting the element
// Regression test for https://github.com/DioxusLabs/dioxus/issues/3185
#[component]