update to taffy 0.2
This commit is contained in:
1 parent
f9059c3f30
commit
5f4b08496c
2 files changed
+23
-22
No files matched your search
@@ -15,12 +15,13 @@ dioxus-core = { path = "../core", version = "^0.2.1" }
|
|||||||
dioxus-html = { path = "../html", version = "^0.2.1" }
|
dioxus-html = { path = "../html", version = "^0.2.1" }
|
||||||
dioxus-core-macro = { path = "../core-macro", version = "^0.2.1" }
|
dioxus-core-macro = { path = "../core-macro", version = "^0.2.1" }
|
||||||
|
|
||||||
taffy = "0.1.0"
|
taffy = "0.2.0"
|
||||||
smallvec = "1.6"
|
smallvec = "1.6"
|
||||||
rustc-hash = "1.1.0"
|
rustc-hash = "1.1.0"
|
||||||
anymap = "0.12.1"
|
anymap = "0.12.1"
|
||||||
slab = "0.4"
|
slab = "0.4"
|
||||||
parking_lot = "0.12.1"
|
parking_lot = "0.12.1"
|
||||||
|
crossbeam-deque = "0.8.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
@@ -343,14 +343,14 @@ fn apply_border(name: &str, value: &str, style: &mut Style) {
|
|||||||
"border-left" => {}
|
"border-left" => {}
|
||||||
"border-left-color" => {}
|
"border-left-color" => {}
|
||||||
"border-left-style" => {
|
"border-left-style" => {
|
||||||
if style.border.start == Dimension::default() {
|
if style.border.left == Dimension::default() {
|
||||||
let v = Dimension::Points(1.0);
|
let v = Dimension::Points(1.0);
|
||||||
style.border.start = v;
|
style.border.left = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"border-left-width" => {
|
"border-left-width" => {
|
||||||
if let Some(v) = parse_value(value) {
|
if let Some(v) = parse_value(value) {
|
||||||
style.border.start = v;
|
style.border.left = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"border-radius" => {}
|
"border-radius" => {}
|
||||||
@@ -358,11 +358,11 @@ fn apply_border(name: &str, value: &str, style: &mut Style) {
|
|||||||
"border-right-color" => {}
|
"border-right-color" => {}
|
||||||
"border-right-style" => {
|
"border-right-style" => {
|
||||||
let v = Dimension::Points(1.0);
|
let v = Dimension::Points(1.0);
|
||||||
style.border.end = v;
|
style.border.right = v;
|
||||||
}
|
}
|
||||||
"border-right-width" => {
|
"border-right-width" => {
|
||||||
if let Some(v) = parse_value(value) {
|
if let Some(v) = parse_value(value) {
|
||||||
style.border.end = v;
|
style.border.right = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"border-spacing" => {}
|
"border-spacing" => {}
|
||||||
@@ -375,13 +375,13 @@ fn apply_border(name: &str, value: &str, style: &mut Style) {
|
|||||||
let v = Dimension::Points(1.0);
|
let v = Dimension::Points(1.0);
|
||||||
style.border.bottom = v;
|
style.border.bottom = v;
|
||||||
}
|
}
|
||||||
if style.border.start == Dimension::default() {
|
if style.border.left == Dimension::default() {
|
||||||
let v = Dimension::Points(1.0);
|
let v = Dimension::Points(1.0);
|
||||||
style.border.start = v;
|
style.border.left = v;
|
||||||
}
|
}
|
||||||
if style.border.end == Dimension::default() {
|
if style.border.right == Dimension::default() {
|
||||||
let v = Dimension::Points(1.0);
|
let v = Dimension::Points(1.0);
|
||||||
style.border.end = v;
|
style.border.right = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"border-top" => {}
|
"border-top" => {}
|
||||||
@@ -404,8 +404,8 @@ fn apply_border(name: &str, value: &str, style: &mut Style) {
|
|||||||
if values.len() == 1 {
|
if values.len() == 1 {
|
||||||
if let Some(dim) = parse_value(values[0]) {
|
if let Some(dim) = parse_value(values[0]) {
|
||||||
style.border = Rect {
|
style.border = Rect {
|
||||||
start: dim,
|
right: dim,
|
||||||
end: dim,
|
left: dim,
|
||||||
top: dim,
|
top: dim,
|
||||||
bottom: dim,
|
bottom: dim,
|
||||||
};
|
};
|
||||||
@@ -414,8 +414,8 @@ fn apply_border(name: &str, value: &str, style: &mut Style) {
|
|||||||
let border_widths = [
|
let border_widths = [
|
||||||
&mut style.border.top,
|
&mut style.border.top,
|
||||||
&mut style.border.bottom,
|
&mut style.border.bottom,
|
||||||
&mut style.border.start,
|
&mut style.border.left,
|
||||||
&mut style.border.end,
|
&mut style.border.right,
|
||||||
];
|
];
|
||||||
for (v, width) in values.into_iter().zip(border_widths) {
|
for (v, width) in values.into_iter().zip(border_widths) {
|
||||||
if let Some(w) = parse_value(v) {
|
if let Some(w) = parse_value(v) {
|
||||||
@@ -512,12 +512,12 @@ fn apply_padding(name: &str, value: &str, style: &mut Style) {
|
|||||||
"padding" => {
|
"padding" => {
|
||||||
style.padding.top = v;
|
style.padding.top = v;
|
||||||
style.padding.bottom = v;
|
style.padding.bottom = v;
|
||||||
style.padding.start = v;
|
style.padding.left = v;
|
||||||
style.padding.end = v;
|
style.padding.right = v;
|
||||||
}
|
}
|
||||||
"padding-bottom" => style.padding.bottom = v,
|
"padding-bottom" => style.padding.bottom = v,
|
||||||
"padding-left" => style.padding.start = v,
|
"padding-left" => style.padding.left = v,
|
||||||
"padding-right" => style.padding.end = v,
|
"padding-right" => style.padding.right = v,
|
||||||
"padding-top" => style.padding.top = v,
|
"padding-top" => style.padding.top = v,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
@@ -578,13 +578,13 @@ fn apply_margin(name: &str, value: &str, style: &mut Style) {
|
|||||||
"margin" => {
|
"margin" => {
|
||||||
style.margin.top = dim;
|
style.margin.top = dim;
|
||||||
style.margin.bottom = dim;
|
style.margin.bottom = dim;
|
||||||
style.margin.start = dim;
|
style.margin.left = dim;
|
||||||
style.margin.end = dim;
|
style.margin.right = dim;
|
||||||
}
|
}
|
||||||
"margin-top" => style.margin.top = dim,
|
"margin-top" => style.margin.top = dim,
|
||||||
"margin-bottom" => style.margin.bottom = dim,
|
"margin-bottom" => style.margin.bottom = dim,
|
||||||
"margin-left" => style.margin.start = dim,
|
"margin-left" => style.margin.left = dim,
|
||||||
"margin-right" => style.margin.end = dim,
|
"margin-right" => style.margin.right = dim,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user