gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 227Rust 7TOML 3CSS 1307 Definitions

code cleanup

488ad901eea235196f3ab828843f7afff0449f65 · by Emil Sjölander · (7 years ago) · parent 35fe2ad57 · browse the tree at this commit

Semantic delta · 1

src/algo.rs

1 files · +1 −1

diff --git a/src/algo.rs b/src/algo.rs
index 52e7666ab..778e87e17 100644
--- a/src/algo.rs
+++ b/src/algo.rs
@@ -395,7 +395,7 @@ fn compute_internal(
 
     flex_items.iter_mut().for_each(|child| {
         child.inner_flex_basis =
-            child.flex_basis - (child.padding.main(node.flex_direction) + child.border.main(node.flex_direction));
+            child.flex_basis - child.padding.main(node.flex_direction) - child.border.main(node.flex_direction);
 
         // TODO - not really spec abiding but needs to be done somewhere. probably somewhere else though.
         // The following logic was developed not from the spec but by trail and error looking into how