fixed some css Auto bugs
This commit is contained in:
+11
-7
@@ -7,13 +7,17 @@ fn main() {
|
|||||||
#[component]
|
#[component]
|
||||||
pub fn App() {
|
pub fn App() {
|
||||||
rsx! {
|
rsx! {
|
||||||
text { style: style!{
|
@SetStyle(css! {
|
||||||
outline: true,
|
div {
|
||||||
}, "Hello, World!\nabc" }
|
outline: true,
|
||||||
|
width: 33%,
|
||||||
|
x: Auto,
|
||||||
|
y: 0 px,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
text { style: style!{
|
div { class: "div" }
|
||||||
outline: true,
|
div { class: "div" }
|
||||||
width: 3 px
|
div { class: "div" }
|
||||||
}, "Hello, World!\nabc testing" }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -81,7 +81,10 @@ impl<'a> Frame<'a> {
|
|||||||
|
|
||||||
for i in y..y + height {
|
for i in y..y + height {
|
||||||
if let Some(o) = self.used.get_mut(i as usize) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user