fixed some css Auto bugs

This commit is contained in:
2025-01-05 07:21:41 -06:00
parent ceffc597db
commit 56475078f4
2 changed files with 15 additions and 8 deletions
+10 -6
View File
@@ -7,13 +7,17 @@ fn main() {
#[component]
pub fn App() {
rsx! {
text { style: style!{
@SetStyle(css! {
div {
outline: true,
}, "Hello, World!\nabc" }
width: 33%,
x: Auto,
y: 0 px,
}
})
text { style: style!{
outline: true,
width: 3 px
}, "Hello, World!\nabc testing" }
div { class: "div" }
div { class: "div" }
div { class: "div" }
}
}
+4 -1
View File
@@ -81,7 +81,10 @@ impl<'a> Frame<'a> {
for i in y..y + height {
if let Some(o) = self.used.get_mut(i as usize) {
*o += x + width + 1;
if style_element.x.1 != crate::ui::Number::Auto {
*o += x;
}
*o += width + 1;
}
}
}