gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Sutichaykuna

Fix `justify-content` and `align-content` when free space is negative (content overflows container) (#551)

* Add tests for justify-content with negative free space (content overflows container)

* Add tests for align-content with negative free space (content overflows container)

* Add tests for content alignment with negative space and gap

* Add tests for align/justify-content with negative free space for CSS Grid containers

* Fix alignment when free space is negative

Co-authored-by: robtfm <50659922+robtfm@users.noreply.github.com>

* Remove existing CSS Grid accounting for negative free space when aligning

* Add alignment fix to release notes

---------

Co-authored-by: robtfm <50659922+robtfm@users.noreply.github.com>

48e4800f14c6af5cd26275fb570d11b93e279654 · ruwaq Nico Burns · (3 wata ñawpaq) · tayta 120bb7a2e · kay commitpi sach'ata qhaway

Semántico sayk'uy · 116

src/compute/common/alignment.rs

src/compute/grid/alignment.rs

tests/generated/flex/align_content_center_single_line.rs

tests/generated/flex/align_content_center_single_line_negative_space.rs

tests/generated/flex/align_content_center_single_line_negative_space_gap.rs

tests/generated/flex/align_content_center_wrapped.rs

tests/generated/flex/align_content_center_wrapped_negative_space.rs

tests/generated/flex/align_content_center_wrapped_negative_space_gap.rs

tests/generated/flex/align_content_end.rs

tests/generated/flex/align_content_end_single_line_negative_space.rs

tests/generated/flex/align_content_end_single_line_negative_space_gap.rs

tests/generated/flex/align_content_end_wrapped_negative_space.rs

tests/generated/flex/align_content_end_wrapped_negative_space_gap.rs

tests/generated/flex/align_content_space_around_single_line_negative_space.rs

tests/generated/flex/align_content_space_around_single_line_negative_space_gap.rs

tests/generated/flex/align_content_space_around_wrapped_negative_space.rs

tests/generated/flex/align_content_space_around_wrapped_negative_space_gap.rs

tests/generated/flex/align_content_space_between_single_line_negative_space.rs

tests/generated/flex/align_content_space_between_single_line_negative_space_gap.rs

tests/generated/flex/align_content_space_between_wrapped_negative_space.rs

tests/generated/flex/align_content_space_between_wrapped_negative_space_gap.rs

tests/generated/flex/align_content_space_evenly_single_line_negative_space.rs

tests/generated/flex/align_content_space_evenly_single_line_negative_space_gap.rs

tests/generated/flex/align_content_space_evenly_wrapped_negative_space.rs

tests/generated/flex/align_content_space_evenly_wrapped_negative_space_gap.rs

tests/generated/flex/align_content_start.rs

tests/generated/flex/align_content_start_single_line_negative_space.rs

tests/generated/flex/align_content_start_single_line_negative_space_gap.rs

tests/generated/flex/align_content_start_wrapped_negative_space.rs

tests/generated/flex/justify_content_column_center_negative_space.rs

tests/generated/flex/justify_content_column_center_negative_space_gap.rs

tests/generated/flex/justify_content_column_end.rs

tests/generated/flex/justify_content_column_end_negative_space.rs

tests/generated/flex/justify_content_column_end_negative_space_gap.rs

tests/generated/flex/justify_content_column_end_reverse.rs

tests/generated/flex/justify_content_column_flex_end_reverse.rs

tests/generated/flex/justify_content_column_flex_start_reverse.rs

tests/generated/flex/justify_content_column_space_around_negative_space.rs

tests/generated/flex/justify_content_column_space_around_negative_space_gap.rs

tests/generated/flex/justify_content_column_space_between_negative_space.rs

tests/generated/flex/justify_content_column_space_between_negative_space_gap.rs

tests/generated/flex/justify_content_column_space_evenly_negative_space.rs

tests/generated/flex/justify_content_column_space_evenly_negative_space_gap.rs

tests/generated/flex/justify_content_column_start.rs

tests/generated/flex/justify_content_column_start_negative_space.rs

tests/generated/flex/justify_content_column_start_negative_space_gap.rs

tests/generated/flex/justify_content_column_start_reverse.rs

tests/generated/flex/mod.rs

tests/generated/grid/grid_align_content_center_negative_space_gap.rs

tests/generated/grid/grid_align_content_end_negative_space_gap.rs

tests/generated/grid/grid_align_content_space_around_negative_space_gap.rs

tests/generated/grid/grid_align_content_space_between_negative_space_gap.rs

tests/generated/grid/grid_align_content_space_evenly_negative_space_gap.rs

tests/generated/grid/grid_align_content_start_negative_space_gap.rs

tests/generated/grid/grid_justify_content_center_negative_space_gap.rs

tests/generated/grid/grid_justify_content_end_negative_space_gap.rs

tests/generated/grid/grid_justify_content_space_around_negative_space_gap.rs

tests/generated/grid/grid_justify_content_space_between_negative_space_gap.rs

tests/generated/grid/grid_justify_content_space_evenly_negative_space_gap.rs

tests/generated/grid/grid_justify_content_start_negative_space_gap.rs

119 qillqakuna · +6618 −22

diff --git a/RELEASES.md b/RELEASES.md
index 63b59671e..4479cc896 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -50,6 +50,12 @@ Example usage change:
   - All types from the `node`, `data`, `layout`, `error` and `cache` modules have been moved to the  the `tree` module.
 - Fixed misspelling: `RunMode::PeformLayout` renamed into `RunMode::PerformLayout` (added missing `r`).
 
+## 0.3.15
+
+### Fixes
+
+- Fix justify-content and align-content when free space is negative (content overflows container) (#549) (#551)
+
 ## 0.3.14
 
 ### Fixes
diff --git a/src/compute/common/alignment.rs b/src/compute/common/alignment.rs
index fb6937520..c0725a8f2 100644
--- a/src/compute/common/alignment.rs
+++ b/src/compute/common/alignment.rs
@@ -35,10 +35,23 @@ pub(crate) fn compute_alignment_offset(
             AlignContent::Center => free_space / 2.0,
             AlignContent::Stretch => 0.0,
             AlignContent::SpaceBetween => 0.0,
-            AlignContent::SpaceAround => (free_space / num_items as f32) / 2.0,
-            AlignContent::SpaceEvenly => free_space / (num_items + 1) as f32,
+            AlignContent::SpaceAround => {
+                if free_space >= 0.0 {
+                    (free_space / num_items as f32) / 2.0
+                } else {
+                    free_space / 2.0
+                }
+            }
+            AlignContent::SpaceEvenly => {
+                if free_space >= 0.0 {
+                    free_space / (num_items + 1) as f32
+                } else {
+                    free_space / 2.0
+                }
+            }
         }
     } else {
+        let free_space = free_space.max(0.0);
         gap + match alignment_mode {
             AlignContent::Start => 0.0,
             AlignContent::FlexStart => 0.0,
diff --git a/src/compute/grid/alignment.rs b/src/compute/grid/alignment.rs
index 745d22026..144aa3316 100644
--- a/src/compute/grid/alignment.rs
+++ b/src/compute/grid/alignment.rs
@@ -6,7 +6,7 @@ use crate::geometry::{Line, Point, Rect, Size};
 use crate::style::{AlignContent, AlignItems, AlignSelf, AvailableSpace, Position};
 use crate::tree::{Layout, SizingMode};
 use crate::tree::{LayoutTree, NodeId};
-use crate::util::sys::{f32_max, f32_min};
+use crate::util::sys::f32_max;
 use crate::util::MaybeMath;
 use crate::util::{MaybeResolve, ResolveOrZero};
 
@@ -21,25 +21,8 @@ pub(super) fn align_tracks(
     track_alignment_style: AlignContent,
 ) {
     let used_size: f32 = tracks.iter().map(|track| track.base_size).sum();
-    let size_diff = grid_container_content_box_size - used_size;
-    let free_space = f32_max(size_diff, 0.0);
-    let overflow = f32_min(size_diff, 0.0);
-
-    // If the used_size > grid_container_size then the tracks must overflow their container
-    // The direction in which they do so is determined by the alignment style
-    let origin = padding.start
-        + border.start
-        + match track_alignment_style {
-            AlignContent::Start => 0.0,
-            AlignContent::FlexStart => 0.0,
-            AlignContent::End => overflow,
-            AlignContent::FlexEnd => overflow,
-            AlignContent::Center => overflow / 2.0,
-            AlignContent::Stretch => 0.0,
-            AlignContent::SpaceBetween => 0.0,
-            AlignContent::SpaceEvenly => 0.0,
-            AlignContent::SpaceAround => 0.0,
-        };
+    let free_space = grid_container_content_box_size - used_size;
+    let origin = padding.start + border.start;
 
     // Count the number of non-collapsed tracks (not counting gutters)
     let num_tracks = tracks.iter().skip(1).step_by(2).filter(|track| !track.is_collapsed).count();
diff --git a/test_fixtures/flex/align_content_center_single_line.html b/test_fixtures/flex/align_content_center_single_line.html
new file mode 100644
index 000000000..6cfe21bce
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_single_line.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 120px; height: 100px; flex-direction: row; align-content: center;">
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_center_single_line_negative_space.html b/test_fixtures/flex/align_content_center_single_line_negative_space.html
new file mode 100644
index 000000000..1b7edec97
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: center; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_center_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_center_single_line_negative_space_gap.html
new file mode 100644
index 000000000..00060caea
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: center; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_center_wrapped.html b/test_fixtures/flex/align_content_center_wrapped.html
new file mode 100644
index 000000000..19fd3c4d0
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_wrapped.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 120px; height: 100px; flex-direction: row; flex-wrap: wrap; align-content: center;">
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+  <div style="height: 10px; width: 50px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_center_wrapped_negative_space.html b/test_fixtures/flex/align_content_center_wrapped_negative_space.html
new file mode 100644
index 000000000..5079af76a
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_center_wrapped_negative_space_gap.html b/test_fixtures/flex/align_content_center_wrapped_negative_space_gap.html
new file mode 100644
index 000000000..8d7fde641
--- /dev/null
+++ b/test_fixtures/flex/align_content_center_wrapped_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_end.html b/test_fixtures/flex/align_content_end.html
new file mode 100644
index 000000000..8cc2adbac
--- /dev/null
+++ b/test_fixtures/flex/align_content_end.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; flex-wrap: wrap; flex-direction: column; align-content: end;">
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_end_single_line_negative_space.html b/test_fixtures/flex/align_content_end_single_line_negative_space.html
new file mode 100644
index 000000000..b306a7549
--- /dev/null
+++ b/test_fixtures/flex/align_content_end_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: end; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_end_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_end_single_line_negative_space_gap.html
new file mode 100644
index 000000000..3eb1be2a5
--- /dev/null
+++ b/test_fixtures/flex/align_content_end_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: end; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_end_wrapped_negative_space.html b/test_fixtures/flex/align_content_end_wrapped_negative_space.html
new file mode 100644
index 000000000..759073fb2
--- /dev/null
+++ b/test_fixtures/flex/align_content_end_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: end; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_end_wrapped_negative_space_gap.html b/test_fixtures/flex/align_content_end_wrapped_negative_space_gap.html
new file mode 100644
index 000000000..7b63e2f69
--- /dev/null
+++ b/test_fixtures/flex/align_content_end_wrapped_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: end; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_around_single_line_negative_space.html b/test_fixtures/flex/align_content_space_around_single_line_negative_space.html
new file mode 100644
index 000000000..60a99702b
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_around_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-around; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_around_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_space_around_single_line_negative_space_gap.html
new file mode 100644
index 000000000..30e4b0ed0
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_around_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-around; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_around_wrapped_negative_space.html b/test_fixtures/flex/align_content_space_around_wrapped_negative_space.html
new file mode 100644
index 000000000..ccf789ae2
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_around_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-around; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_around_wrapped_negative_space_gap.html b/test_fixtures/flex/align_content_space_around_wrapped_negative_space_gap.html
new file mode 100644
index 000000000..b9823ccbc
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_around_wrapped_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-around; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_between_single_line_negative_space.html b/test_fixtures/flex/align_content_space_between_single_line_negative_space.html
new file mode 100644
index 000000000..941f7dd06
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_between_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-between; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_between_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_space_between_single_line_negative_space_gap.html
new file mode 100644
index 000000000..c74844a59
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_between_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-between; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_between_wrapped_negative_space.html b/test_fixtures/flex/align_content_space_between_wrapped_negative_space.html
new file mode 100644
index 000000000..4d58d073a
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_between_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-between; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_between_wrapped_negative_space_gap.html b/test_fixtures/flex/align_content_space_between_wrapped_negative_space_gap.html
new file mode 100644
index 000000000..11bbdad97
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_between_wrapped_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-between; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_evenly_single_line_negative_space.html b/test_fixtures/flex/align_content_space_evenly_single_line_negative_space.html
new file mode 100644
index 000000000..72b74bae9
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_evenly_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-evenly; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_evenly_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_space_evenly_single_line_negative_space_gap.html
new file mode 100644
index 000000000..18e3042cd
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_evenly_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: space-evenly; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space.html b/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space.html
new file mode 100644
index 000000000..3d16aff05
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-evenly; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space_gap.html b/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space_gap.html
new file mode 100644
index 000000000..35e63fd1f
--- /dev/null
+++ b/test_fixtures/flex/align_content_space_evenly_wrapped_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: space-evenly; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_start.html b/test_fixtures/flex/align_content_start.html
new file mode 100644
index 000000000..2918f9db9
--- /dev/null
+++ b/test_fixtures/flex/align_content_start.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 130px; height: 100px; flex-wrap: wrap; flex-direction: row; align-content: start;">
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+  <div style="width: 50px; height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_start_single_line_negative_space.html b/test_fixtures/flex/align_content_start_single_line_negative_space.html
new file mode 100644
index 000000000..d8150808b
--- /dev/null
+++ b/test_fixtures/flex/align_content_start_single_line_negative_space.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: start; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_start_single_line_negative_space_gap.html b/test_fixtures/flex/align_content_start_single_line_negative_space_gap.html
new file mode 100644
index 000000000..981ff4cdb
--- /dev/null
+++ b/test_fixtures/flex/align_content_start_single_line_negative_space_gap.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; align-content: start; justify-content: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 60px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/align_content_start_wrapped_negative_space.html b/test_fixtures/flex/align_content_start_wrapped_negative_space.html
new file mode 100644
index 000000000..e97b40927
--- /dev/null
+++ b/test_fixtures/flex/align_content_start_wrapped_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: row; flex-wrap: wrap; align-content: start; justify-content: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_center_negative_space.html b/test_fixtures/flex/justify_content_column_center_negative_space.html
new file mode 100644
index 000000000..7eb8da79a
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_center_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_center_negative_space_gap.html b/test_fixtures/flex/justify_content_column_center_negative_space_gap.html
new file mode 100644
index 000000000..040655009
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_center_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_end.html b/test_fixtures/flex/justify_content_column_end.html
new file mode 100644
index 000000000..b09f342ae
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_end.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: flex-end; flex-direction: column;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_end_negative_space.html b/test_fixtures/flex/justify_content_column_end_negative_space.html
new file mode 100644
index 000000000..e1c2e1654
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_end_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: end; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_end_negative_space_gap.html b/test_fixtures/flex/justify_content_column_end_negative_space_gap.html
new file mode 100644
index 000000000..de62349e7
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_end_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: end; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_end_reverse.html b/test_fixtures/flex/justify_content_column_end_reverse.html
new file mode 100644
index 000000000..b09f342ae
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_end_reverse.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: flex-end; flex-direction: column;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_flex_end_reverse.html b/test_fixtures/flex/justify_content_column_flex_end_reverse.html
new file mode 100644
index 000000000..90c12241f
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_flex_end_reverse.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: flex-end; flex-direction: column-reverse;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_flex_start_reverse.html b/test_fixtures/flex/justify_content_column_flex_start_reverse.html
new file mode 100644
index 000000000..74fe4bdc7
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_flex_start_reverse.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: flex-start; flex-direction: column-reverse;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_around_negative_space.html b/test_fixtures/flex/justify_content_column_space_around_negative_space.html
new file mode 100644
index 000000000..9d9db6212
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_around_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-around; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_around_negative_space_gap.html b/test_fixtures/flex/justify_content_column_space_around_negative_space_gap.html
new file mode 100644
index 000000000..b321b31b1
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_around_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-around; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_between_negative_space.html b/test_fixtures/flex/justify_content_column_space_between_negative_space.html
new file mode 100644
index 000000000..66c417055
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_between_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-between; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_between_negative_space_gap.html b/test_fixtures/flex/justify_content_column_space_between_negative_space_gap.html
new file mode 100644
index 000000000..52365cf18
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_between_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-between; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_evenly_negative_space.html b/test_fixtures/flex/justify_content_column_space_evenly_negative_space.html
new file mode 100644
index 000000000..5838088e1
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_evenly_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_space_evenly_negative_space_gap.html b/test_fixtures/flex/justify_content_column_space_evenly_negative_space_gap.html
new file mode 100644
index 000000000..3524604db
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_space_evenly_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_start.html b/test_fixtures/flex/justify_content_column_start.html
new file mode 100644
index 000000000..9267eeceb
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_start.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: start; flex-direction: column;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_start_negative_space.html b/test_fixtures/flex/justify_content_column_start_negative_space.html
new file mode 100644
index 000000000..3bc0f680d
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_start_negative_space.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: start; align-items: center; height: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_start_negative_space_gap.html b/test_fixtures/flex/justify_content_column_start_negative_space_gap.html
new file mode 100644
index 000000000..ee40ca5f1
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_start_negative_space_gap.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: flex; flex-direction: column; width: 320px; height: 320px; border-width: 60px;">
+  <div style="display: flex; flex-direction: column; justify-content: start; align-items: center; height: 10px; gap: 10px;">
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+    <div style="width: 80%; height: 20px; flex-shrink: 0;"></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/flex/justify_content_column_start_reverse.html b/test_fixtures/flex/justify_content_column_start_reverse.html
new file mode 100644
index 000000000..91f48b2c8
--- /dev/null
+++ b/test_fixtures/flex/justify_content_column_start_reverse.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="width: 100px; height: 100px; justify-content: start; flex-direction: column-reverse;">
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+  <div style="height: 10px;"></div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_center_negative_space_gap.html b/test_fixtures/grid/grid_align_content_center_negative_space_gap.html
new file mode 100644
index 000000000..4de8b17cc
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_center_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_end_negative_space_gap.html b/test_fixtures/grid/grid_align_content_end_negative_space_gap.html
new file mode 100644
index 000000000..782789b60
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_end_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: end; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_space_around_negative_space_gap.html b/test_fixtures/grid/grid_align_content_space_around_negative_space_gap.html
new file mode 100644
index 000000000..e26e5ee68
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_space_around_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: space-around; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_space_between_negative_space_gap.html b/test_fixtures/grid/grid_align_content_space_between_negative_space_gap.html
new file mode 100644
index 000000000..a6fb0d877
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_space_between_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: space-between; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_space_evenly_negative_space_gap.html b/test_fixtures/grid/grid_align_content_space_evenly_negative_space_gap.html
new file mode 100644
index 000000000..a6fb0d877
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_space_evenly_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: space-between; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_align_content_start_negative_space_gap.html b/test_fixtures/grid/grid_align_content_start_negative_space_gap.html
new file mode 100644
index 000000000..a4437a662
--- /dev/null
+++ b/test_fixtures/grid/grid_align_content_start_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 20px 20px 20px; grid-template-rows: 40px 40px 40px; justify-content: center; align-content: start; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_center_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_center_negative_space_gap.html
new file mode 100644
index 000000000..175c97da0
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_center_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: center; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_end_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_end_negative_space_gap.html
new file mode 100644
index 000000000..858370b97
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_end_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: end; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_space_around_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_space_around_negative_space_gap.html
new file mode 100644
index 000000000..cbcd18211
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_space_around_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: space-around; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_space_between_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_space_between_negative_space_gap.html
new file mode 100644
index 000000000..609ec4451
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_space_between_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: space-between; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_space_evenly_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_space_evenly_negative_space_gap.html
new file mode 100644
index 000000000..807148706
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_space_evenly_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: space-evenly; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/grid/grid_justify_content_start_negative_space_gap.html b/test_fixtures/grid/grid_justify_content_start_negative_space_gap.html
new file mode 100644
index 000000000..70c07b4a0
--- /dev/null
+++ b/test_fixtures/grid/grid_justify_content_start_negative_space_gap.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+</head>
+<body>
+
+<div id="test-root" style="display: grid; width: 240px; height: 240px; border-width: 60px;">
+  <div id="test-root" style="height: 120px; width: 120px; display: grid; grid-template-columns: 40px 40px 40px; grid-template-rows: 20px 20px 20px; justify-content: start; align-content: center; gap: 10px;">
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+    <div></div>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/tests/generated/flex/align_content_center_single_line.rs b/tests/generated/flex/align_content_center_single_line.rs
new file mode 100644
index 000000000..58adff549
--- /dev/null
+++ b/tests/generated/flex/align_content_center_single_line.rs
@@ -0,0 +1,112 @@
+#[test]
+fn align_content_center_single_line() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node3 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node4 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node5 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                align_content: Some(taffy::style::AlignContent::Center),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2, node3, node4, node5],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node, 120f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node0, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node1, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node1, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node2, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node2, 40f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node2, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node3).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node3, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node3, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node3, 60f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node3, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node4).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node4, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node4, 10f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node4, 80f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node4, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node5).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node5, 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node5, 10f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node5, 100f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node5, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_center_single_line_negative_space.rs b/tests/generated/flex/align_content_center_single_line_negative_space.rs
new file mode 100644
index 000000000..dffc12947
--- /dev/null
+++ b/tests/generated/flex/align_content_center_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_center_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_center_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_center_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..2aa523b2c
--- /dev/null
+++ b/tests/generated/flex/align_content_center_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_center_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_center_wrapped.rs b/tests/generated/flex/align_content_center_wrapped.rs
new file mode 100644
index 000000000..159160700
--- /dev/null
+++ b/tests/generated/flex/align_content_center_wrapped.rs
@@ -0,0 +1,113 @@
+#[test]
+fn align_content_center_wrapped() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node3 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node4 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node5 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::Center),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2, node3, node4, node5],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node, 120f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 35f32, "y of node {:?}. Expected {}. Actual {}", node0, 35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node1, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1, 50f32, location.x);
+    assert_eq!(location.y, 35f32, "y of node {:?}. Expected {}. Actual {}", node1, 35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node2, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 45f32, "y of node {:?}. Expected {}. Actual {}", node2, 45f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node3).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node3, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node3, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node3, 50f32, location.x);
+    assert_eq!(location.y, 45f32, "y of node {:?}. Expected {}. Actual {}", node3, 45f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node4).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node4, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node4, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node4, 0f32, location.x);
+    assert_eq!(location.y, 55f32, "y of node {:?}. Expected {}. Actual {}", node4, 55f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node5).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node5, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node5, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node5, 50f32, location.x);
+    assert_eq!(location.y, 55f32, "y of node {:?}. Expected {}. Actual {}", node5, 55f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_center_wrapped_negative_space.rs b/tests/generated/flex/align_content_center_wrapped_negative_space.rs
new file mode 100644
index 000000000..20b1b51ae
--- /dev/null
+++ b/tests/generated/flex/align_content_center_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_center_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_center_wrapped_negative_space_gap.rs b/tests/generated/flex/align_content_center_wrapped_negative_space_gap.rs
new file mode 100644
index 000000000..99536bbfc
--- /dev/null
+++ b/tests/generated/flex/align_content_center_wrapped_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn align_content_center_wrapped_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_end.rs b/tests/generated/flex/align_content_end.rs
new file mode 100644
index 000000000..82bf7c828
--- /dev/null
+++ b/tests/generated/flex/align_content_end.rs
@@ -0,0 +1,100 @@
+#[test]
+fn align_content_end() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node3 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node4 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::Column,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::End),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2, node3, node4],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node0, 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node1, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1, 50f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node1, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node2, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node2, 50f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node2, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node3).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node3, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node3, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node3, 50f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node3, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node4).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node4, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node4, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node4, 50f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node4, 40f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_end_single_line_negative_space.rs b/tests/generated/flex/align_content_end_single_line_negative_space.rs
new file mode 100644
index 000000000..b8493e58d
--- /dev/null
+++ b/tests/generated/flex/align_content_end_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_end_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::End),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_end_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_end_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..d6e051c5d
--- /dev/null
+++ b/tests/generated/flex/align_content_end_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_end_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::End),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_end_wrapped_negative_space.rs b/tests/generated/flex/align_content_end_wrapped_negative_space.rs
new file mode 100644
index 000000000..1dede69f6
--- /dev/null
+++ b/tests/generated/flex/align_content_end_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_end_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::End),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -50f32, "y of node {:?}. Expected {}. Actual {}", node00, -50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -30f32, "y of node {:?}. Expected {}. Actual {}", node01, -30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_end_wrapped_negative_space_gap.rs b/tests/generated/flex/align_content_end_wrapped_negative_space_gap.rs
new file mode 100644
index 000000000..360e0bc4f
--- /dev/null
+++ b/tests/generated/flex/align_content_end_wrapped_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn align_content_end_wrapped_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::End),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -70f32, "y of node {:?}. Expected {}. Actual {}", node00, -70f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -40f32, "y of node {:?}. Expected {}. Actual {}", node01, -40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_around_single_line_negative_space.rs b/tests/generated/flex/align_content_space_around_single_line_negative_space.rs
new file mode 100644
index 000000000..d62bf7f86
--- /dev/null
+++ b/tests/generated/flex/align_content_space_around_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_space_around_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceAround),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_around_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_space_around_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..382e03a48
--- /dev/null
+++ b/tests/generated/flex/align_content_space_around_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_space_around_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceAround),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_around_wrapped_negative_space.rs b/tests/generated/flex/align_content_space_around_wrapped_negative_space.rs
new file mode 100644
index 000000000..9080987c5
--- /dev/null
+++ b/tests/generated/flex/align_content_space_around_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_space_around_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceAround),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_around_wrapped_negative_space_gap.rs b/tests/generated/flex/align_content_space_around_wrapped_negative_space_gap.rs
new file mode 100644
index 000000000..a9387dbbb
--- /dev/null
+++ b/tests/generated/flex/align_content_space_around_wrapped_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn align_content_space_around_wrapped_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceAround),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_between_single_line_negative_space.rs b/tests/generated/flex/align_content_space_between_single_line_negative_space.rs
new file mode 100644
index 000000000..437e947df
--- /dev/null
+++ b/tests/generated/flex/align_content_space_between_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_space_between_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_between_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_space_between_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..5f4bad4f2
--- /dev/null
+++ b/tests/generated/flex/align_content_space_between_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_space_between_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_between_wrapped_negative_space.rs b/tests/generated/flex/align_content_space_between_wrapped_negative_space.rs
new file mode 100644
index 000000000..781c15c6e
--- /dev/null
+++ b/tests/generated/flex/align_content_space_between_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_space_between_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node02, 40f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_between_wrapped_negative_space_gap.rs b/tests/generated/flex/align_content_space_between_wrapped_negative_space_gap.rs
new file mode 100644
index 000000000..f72197fa0
--- /dev/null
+++ b/tests/generated/flex/align_content_space_between_wrapped_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn align_content_space_between_wrapped_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node01, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node02, 60f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_evenly_single_line_negative_space.rs b/tests/generated/flex/align_content_space_evenly_single_line_negative_space.rs
new file mode 100644
index 000000000..43a50179c
--- /dev/null
+++ b/tests/generated/flex/align_content_space_evenly_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_space_evenly_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceEvenly),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_evenly_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_space_evenly_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..0076d2058
--- /dev/null
+++ b/tests/generated/flex/align_content_space_evenly_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_space_evenly_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::SpaceEvenly),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_evenly_wrapped_negative_space.rs b/tests/generated/flex/align_content_space_evenly_wrapped_negative_space.rs
new file mode 100644
index 000000000..d24ec0843
--- /dev/null
+++ b/tests/generated/flex/align_content_space_evenly_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_space_evenly_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceEvenly),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_space_evenly_wrapped_negative_space_gap.rs b/tests/generated/flex/align_content_space_evenly_wrapped_negative_space_gap.rs
new file mode 100644
index 000000000..0d01fd6db
--- /dev/null
+++ b/tests/generated/flex/align_content_space_evenly_wrapped_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn align_content_space_evenly_wrapped_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::SpaceEvenly),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_start.rs b/tests/generated/flex/align_content_start.rs
new file mode 100644
index 000000000..29953788b
--- /dev/null
+++ b/tests/generated/flex/align_content_start.rs
@@ -0,0 +1,99 @@
+#[test]
+fn align_content_start() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node3 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node4 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Length(50f32),
+                height: taffy::style::Dimension::Length(10f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(130f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2, node3, node4],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 130f32, "width of node {:?}. Expected {}. Actual {}", node, 130f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node1, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1, 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node2, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node2, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node3).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node3, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node3, 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node3, 50f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node3, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node4).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node4, 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node4, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node4, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node4, 20f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_start_single_line_negative_space.rs b/tests/generated/flex/align_content_start_single_line_negative_space.rs
new file mode 100644
index 000000000..90b645b09
--- /dev/null
+++ b/tests/generated/flex/align_content_start_single_line_negative_space.rs
@@ -0,0 +1,67 @@
+#[test]
+fn align_content_start_single_line_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::Start),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_start_single_line_negative_space_gap.rs b/tests/generated/flex/align_content_start_single_line_negative_space_gap.rs
new file mode 100644
index 000000000..95b6176de
--- /dev/null
+++ b/tests/generated/flex/align_content_start_single_line_negative_space_gap.rs
@@ -0,0 +1,71 @@
+#[test]
+fn align_content_start_single_line_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(60f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                align_content: Some(taffy::style::AlignContent::Start),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 60f32, "height of node {:?}. Expected {}. Actual {}", node00, 60f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+}
diff --git a/tests/generated/flex/align_content_start_wrapped_negative_space.rs b/tests/generated/flex/align_content_start_wrapped_negative_space.rs
new file mode 100644
index 000000000..5a23c6e34
--- /dev/null
+++ b/tests/generated/flex/align_content_start_wrapped_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn align_content_start_wrapped_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_wrap: taffy::style::FlexWrap::Wrap,
+                align_content: Some(taffy::style::AlignContent::Start),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node02, 40f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_center_negative_space.rs b/tests/generated/flex/justify_content_column_center_negative_space.rs
new file mode 100644
index 000000000..6c19477ba
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_center_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_center_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_center_negative_space_gap.rs b/tests/generated/flex/justify_content_column_center_negative_space_gap.rs
new file mode 100644
index 000000000..cf4605f8c
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_center_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_center_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_end.rs b/tests/generated/flex/justify_content_column_end.rs
new file mode 100644
index 000000000..ac395a5aa
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_end.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_end() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::Column,
+                justify_content: Some(taffy::style::JustifyContent::FlexEnd),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 70f32, "y of node {:?}. Expected {}. Actual {}", node0, 70f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node1, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node2, 90f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_end_negative_space.rs b/tests/generated/flex/justify_content_column_end_negative_space.rs
new file mode 100644
index 000000000..07de47999
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_end_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_end_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::End),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -50f32, "y of node {:?}. Expected {}. Actual {}", node00, -50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -30f32, "y of node {:?}. Expected {}. Actual {}", node01, -30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_end_negative_space_gap.rs b/tests/generated/flex/justify_content_column_end_negative_space_gap.rs
new file mode 100644
index 000000000..6f07f294f
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_end_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_end_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::End),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -70f32, "y of node {:?}. Expected {}. Actual {}", node00, -70f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -40f32, "y of node {:?}. Expected {}. Actual {}", node01, -40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_end_reverse.rs b/tests/generated/flex/justify_content_column_end_reverse.rs
new file mode 100644
index 000000000..d0343ad92
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_end_reverse.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_end_reverse() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::Column,
+                justify_content: Some(taffy::style::JustifyContent::FlexEnd),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 70f32, "y of node {:?}. Expected {}. Actual {}", node0, 70f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node1, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node2, 90f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_flex_end_reverse.rs b/tests/generated/flex/justify_content_column_flex_end_reverse.rs
new file mode 100644
index 000000000..c81ec4a5c
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_flex_end_reverse.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_flex_end_reverse() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::ColumnReverse,
+                justify_content: Some(taffy::style::JustifyContent::FlexEnd),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node0, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node1, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node2, 0f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_flex_start_reverse.rs b/tests/generated/flex/justify_content_column_flex_start_reverse.rs
new file mode 100644
index 000000000..1e647ce9d
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_flex_start_reverse.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_flex_start_reverse() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::ColumnReverse,
+                justify_content: Some(taffy::style::JustifyContent::FlexStart),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node0, 90f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node1, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 70f32, "y of node {:?}. Expected {}. Actual {}", node2, 70f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_around_negative_space.rs b/tests/generated/flex/justify_content_column_space_around_negative_space.rs
new file mode 100644
index 000000000..484a898e4
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_around_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_space_around_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceAround),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_around_negative_space_gap.rs b/tests/generated/flex/justify_content_column_space_around_negative_space_gap.rs
new file mode 100644
index 000000000..dc5681a78
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_around_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_space_around_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceAround),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_between_negative_space.rs b/tests/generated/flex/justify_content_column_space_between_negative_space.rs
new file mode 100644
index 000000000..8916d0361
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_between_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_space_between_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceBetween),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node02, 40f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_between_negative_space_gap.rs b/tests/generated/flex/justify_content_column_space_between_negative_space_gap.rs
new file mode 100644
index 000000000..b618db127
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_between_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_space_between_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceBetween),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node01, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node02, 60f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_evenly_negative_space.rs b/tests/generated/flex/justify_content_column_space_evenly_negative_space.rs
new file mode 100644
index 000000000..11306a5d5
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_evenly_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_space_evenly_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceEvenly),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -25f32, "y of node {:?}. Expected {}. Actual {}", node00, -25f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 15f32, "y of node {:?}. Expected {}. Actual {}", node02, 15f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_space_evenly_negative_space_gap.rs b/tests/generated/flex/justify_content_column_space_evenly_negative_space_gap.rs
new file mode 100644
index 000000000..c56d8ebdb
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_space_evenly_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_space_evenly_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceEvenly),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -35f32, "y of node {:?}. Expected {}. Actual {}", node00, -35f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, -5f32, "y of node {:?}. Expected {}. Actual {}", node01, -5f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 25f32, "y of node {:?}. Expected {}. Actual {}", node02, 25f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_start.rs b/tests/generated/flex/justify_content_column_start.rs
new file mode 100644
index 000000000..5ad5314ef
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_start.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_start() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::Column,
+                justify_content: Some(taffy::style::JustifyContent::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node1, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node2, 20f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_start_negative_space.rs b/tests/generated/flex/justify_content_column_start_negative_space.rs
new file mode 100644
index 000000000..0e2c617bf
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_start_negative_space.rs
@@ -0,0 +1,98 @@
+#[test]
+fn justify_content_column_start_negative_space() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::Start),
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node02, 40f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_start_negative_space_gap.rs b/tests/generated/flex/justify_content_column_start_negative_space_gap.rs
new file mode 100644
index 000000000..4982d423d
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_start_negative_space_gap.rs
@@ -0,0 +1,102 @@
+#[test]
+fn justify_content_column_start_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node01 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node02 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Percent(0.8f32),
+                height: taffy::style::Dimension::Length(20f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                align_items: Some(taffy::style::AlignItems::Center),
+                justify_content: Some(taffy::style::JustifyContent::Start),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+                ..Default::default()
+            },
+            &[node00, node01, node02],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Flex,
+                flex_direction: taffy::style::FlexDirection::Column,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(320f32),
+                    height: taffy::style::Dimension::Length(320f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 320f32, "width of node {:?}. Expected {}. Actual {}", node, 320f32, size.width);
+    assert_eq!(size.height, 320f32, "height of node {:?}. Expected {}. Actual {}", node, 320f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 200f32, "width of node {:?}. Expected {}. Actual {}", node0, 200f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node00, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node01, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node01, 20f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node01, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 160f32, "width of node {:?}. Expected {}. Actual {}", node02, 160f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node02, 20f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node02, 60f32, location.y);
+}
diff --git a/tests/generated/flex/justify_content_column_start_reverse.rs b/tests/generated/flex/justify_content_column_start_reverse.rs
new file mode 100644
index 000000000..b2c46fcd6
--- /dev/null
+++ b/tests/generated/flex/justify_content_column_start_reverse.rs
@@ -0,0 +1,62 @@
+#[test]
+fn justify_content_column_start_reverse() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node2 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Length(10f32) },
+            ..Default::default()
+        })
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                flex_direction: taffy::style::FlexDirection::ColumnReverse,
+                justify_content: Some(taffy::style::JustifyContent::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(100f32),
+                    height: taffy::style::Dimension::Length(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1, node2],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node, 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node, 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node0, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1, 0f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node1, 10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node2).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node2, 100f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node2, 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node2, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node2, 0f32, location.y);
+}
diff --git a/tests/generated/flex/mod.rs b/tests/generated/flex/mod.rs
index bd2b8baed..d3a8cf659 100644
--- a/tests/generated/flex/mod.rs
+++ b/tests/generated/flex/mod.rs
@@ -63,19 +63,46 @@ mod align_baseline_multiline_row_and_column;
 mod align_baseline_nested_child;
 mod align_baseline_nested_column;
 mod align_center_should_size_based_on_content;
+mod align_content_center_single_line;
+mod align_content_center_single_line_negative_space;
+mod align_content_center_single_line_negative_space_gap;
+mod align_content_center_wrapped;
+mod align_content_center_wrapped_negative_space;
+mod align_content_center_wrapped_negative_space_gap;
+mod align_content_end;
+mod align_content_end_single_line_negative_space;
+mod align_content_end_single_line_negative_space_gap;
+mod align_content_end_wrapped_negative_space;
+mod align_content_end_wrapped_negative_space_gap;
 mod align_content_flex_end;
 mod align_content_flex_start;
 mod align_content_flex_start_with_flex;
 mod align_content_flex_start_without_height_on_children;
 mod align_content_not_stretch_with_align_items_stretch;
 mod align_content_space_around_single_line;
+mod align_content_space_around_single_line_negative_space;
+mod align_content_space_around_single_line_negative_space_gap;
 mod align_content_space_around_wrapped;
+mod align_content_space_around_wrapped_negative_space;
+mod align_content_space_around_wrapped_negative_space_gap;
 mod align_content_space_between_single_line;
+mod align_content_space_between_single_line_negative_space;
+mod align_content_space_between_single_line_negative_space_gap;
 mod align_content_space_between_wrapped;
+mod align_content_space_between_wrapped_negative_space;
+mod align_content_space_between_wrapped_negative_space_gap;
 mod align_content_space_evenly_single_line;
+mod align_content_space_evenly_single_line_negative_space;
+mod align_content_space_evenly_single_line_negative_space_gap;
 mod align_content_space_evenly_wrapped;
+mod align_content_space_evenly_wrapped_negative_space;
+mod align_content_space_evenly_wrapped_negative_space_gap;
 mod align_content_spacearound;
 mod align_content_spacebetween;
+mod align_content_start;
+mod align_content_start_single_line_negative_space;
+mod align_content_start_single_line_negative_space_gap;
+mod align_content_start_wrapped_negative_space;
 mod align_content_stretch;
 mod align_content_stretch_column;
 mod align_content_stretch_is_not_overriding_align_items;
@@ -260,15 +287,33 @@ mod intrinsic_sizing_main_size_row;
 mod intrinsic_sizing_main_size_row_nested;
 mod intrinsic_sizing_main_size_row_wrap;
 mod justify_content_column_center;
+mod justify_content_column_center_negative_space;
+mod justify_content_column_center_negative_space_gap;
+mod justify_content_column_end;
+mod justify_content_column_end_negative_space;
+mod justify_content_column_end_negative_space_gap;
+mod justify_content_column_end_reverse;
 mod justify_content_column_flex_end;
+mod justify_content_column_flex_end_reverse;
 mod justify_content_column_flex_start;
+mod justify_content_column_flex_start_reverse;
 mod justify_content_column_max_height_and_margin;
 mod justify_content_column_min_height_and_margin;
 mod justify_content_column_min_height_and_margin_bottom;
 mod justify_content_column_min_height_and_margin_top;
 mod justify_content_column_space_around;
+mod justify_content_column_space_around_negative_space;
+mod justify_content_column_space_around_negative_space_gap;
 mod justify_content_column_space_between;
+mod justify_content_column_space_between_negative_space;
+mod justify_content_column_space_between_negative_space_gap;
 mod justify_content_column_space_evenly;
+mod justify_content_column_space_evenly_negative_space;
+mod justify_content_column_space_evenly_negative_space_gap;
+mod justify_content_column_start;
+mod justify_content_column_start_negative_space;
+mod justify_content_column_start_negative_space_gap;
+mod justify_content_column_start_reverse;
 mod justify_content_min_max;
 mod justify_content_min_width_with_padding_child_width_greater_than_parent;
 mod justify_content_min_width_with_padding_child_width_lower_than_parent;
diff --git a/tests/generated/grid/grid_align_content_center_negative_space_gap.rs b/tests/generated/grid/grid_align_content_center_negative_space_gap.rs
new file mode 100644
index 000000000..216dedaf6
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_center_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_center_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node00, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node01, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node03, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node04, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node05, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node06, 90f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node07, 90f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node08, 90f32, location.y);
+}
diff --git a/tests/generated/grid/grid_align_content_end_negative_space_gap.rs b/tests/generated/grid/grid_align_content_end_negative_space_gap.rs
new file mode 100644
index 000000000..5ae9e7c41
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_end_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_end_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::End),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -20f32, "y of node {:?}. Expected {}. Actual {}", node00, -20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, -20f32, "y of node {:?}. Expected {}. Actual {}", node01, -20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, -20f32, "y of node {:?}. Expected {}. Actual {}", node02, -20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node03, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node04, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 30f32, "y of node {:?}. Expected {}. Actual {}", node05, 30f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_align_content_space_around_negative_space_gap.rs b/tests/generated/grid/grid_align_content_space_around_negative_space_gap.rs
new file mode 100644
index 000000000..722feb601
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_space_around_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_space_around_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::SpaceAround),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node00, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node01, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, -10f32, "y of node {:?}. Expected {}. Actual {}", node02, -10f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node03, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node04, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 40f32, "y of node {:?}. Expected {}. Actual {}", node05, 40f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node06, 90f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node07, 90f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 90f32, "y of node {:?}. Expected {}. Actual {}", node08, 90f32, location.y);
+}
diff --git a/tests/generated/grid/grid_align_content_space_between_negative_space_gap.rs b/tests/generated/grid/grid_align_content_space_between_negative_space_gap.rs
new file mode 100644
index 000000000..7176a5e8e
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_space_between_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_space_between_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node01, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node02, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node06, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node07, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node08, 100f32, location.y);
+}
diff --git a/tests/generated/grid/grid_align_content_space_evenly_negative_space_gap.rs b/tests/generated/grid/grid_align_content_space_evenly_negative_space_gap.rs
new file mode 100644
index 000000000..191b01e4d
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_space_evenly_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_space_evenly_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::SpaceBetween),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node01, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node02, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node06, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node07, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node08, 100f32, location.y);
+}
diff --git a/tests/generated/grid/grid_align_content_start_negative_space_gap.rs b/tests/generated/grid/grid_align_content_start_negative_space_gap.rs
new file mode 100644
index 000000000..a7755180a
--- /dev/null
+++ b/tests/generated/grid/grid_align_content_start_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_align_content_start_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Start),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(40f32), length(40f32), length(40f32)],
+                grid_template_columns: vec![length(20f32), length(20f32), length(20f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node00, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node00, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node00, 20f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node01, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node01, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node01, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node02, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node02, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node02, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node03, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node03, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node03, 20f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node04, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node04, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node05, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node05, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node06, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node06, 40f32, size.height);
+    assert_eq!(location.x, 20f32, "x of node {:?}. Expected {}. Actual {}", node06, 20f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node06, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node07, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node07, 40f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node07, 100f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node08, 20f32, size.width);
+    assert_eq!(size.height, 40f32, "height of node {:?}. Expected {}. Actual {}", node08, 40f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 100f32, "y of node {:?}. Expected {}. Actual {}", node08, 100f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_center_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_center_negative_space_gap.rs
new file mode 100644
index 000000000..1128f082d
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_center_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_center_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Center),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node00, -10f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node01, 40f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node02, 90f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node03, -10f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node04, 40f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node05, 90f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node06, -10f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node07, 40f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node08, 90f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_end_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_end_negative_space_gap.rs
new file mode 100644
index 000000000..fd9f7da3b
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_end_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_end_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::End),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, -20f32, "x of node {:?}. Expected {}. Actual {}", node00, -20f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 30f32, "x of node {:?}. Expected {}. Actual {}", node01, 30f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node02, 80f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, -20f32, "x of node {:?}. Expected {}. Actual {}", node03, -20f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 30f32, "x of node {:?}. Expected {}. Actual {}", node04, 30f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node05, 80f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, -20f32, "x of node {:?}. Expected {}. Actual {}", node06, -20f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 30f32, "x of node {:?}. Expected {}. Actual {}", node07, 30f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 80f32, "x of node {:?}. Expected {}. Actual {}", node08, 80f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_space_around_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_space_around_negative_space_gap.rs
new file mode 100644
index 000000000..9000c2a27
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_space_around_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_space_around_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceAround),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node00, -10f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node01, 40f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node02, 90f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node03, -10f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node04, 40f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node05, 90f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node06, -10f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node07, 40f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node08, 90f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_space_between_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_space_between_negative_space_gap.rs
new file mode 100644
index 000000000..20f70f93a
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_space_between_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_space_between_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceBetween),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node02, 100f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node03, 0f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node05, 100f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node06, 0f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node08, 100f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_space_evenly_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_space_evenly_negative_space_gap.rs
new file mode 100644
index 000000000..81a02cc4a
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_space_evenly_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_space_evenly_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::SpaceEvenly),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node00, -10f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node01, 40f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node02, 90f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node03, -10f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node04, 40f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node05, 90f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, -10f32, "x of node {:?}. Expected {}. Actual {}", node06, -10f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 40f32, "x of node {:?}. Expected {}. Actual {}", node07, 40f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 90f32, "x of node {:?}. Expected {}. Actual {}", node08, 90f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/grid_justify_content_start_negative_space_gap.rs b/tests/generated/grid/grid_justify_content_start_negative_space_gap.rs
new file mode 100644
index 000000000..4d81a62df
--- /dev/null
+++ b/tests/generated/grid/grid_justify_content_start_negative_space_gap.rs
@@ -0,0 +1,114 @@
+#[test]
+fn grid_justify_content_start_negative_space_gap() {
+    #[allow(unused_imports)]
+    use taffy::{prelude::*, tree::Layout};
+    let mut taffy = taffy::Taffy::new();
+    let node00 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node01 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node02 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node03 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node04 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node05 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node06 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node07 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node08 = taffy.new_leaf(taffy::style::Style { ..Default::default() }).unwrap();
+    let node0 = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                align_content: Some(taffy::style::AlignContent::Center),
+                justify_content: Some(taffy::style::JustifyContent::Start),
+                gap: taffy::geometry::Size {
+                    width: taffy::style::LengthPercentage::Length(10f32),
+                    height: taffy::style::LengthPercentage::Length(10f32),
+                },
+                grid_template_rows: vec![length(20f32), length(20f32), length(20f32)],
+                grid_template_columns: vec![length(40f32), length(40f32), length(40f32)],
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(120f32),
+                    height: taffy::style::Dimension::Length(120f32),
+                },
+                ..Default::default()
+            },
+            &[node00, node01, node02, node03, node04, node05, node06, node07, node08],
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                display: taffy::style::Display::Grid,
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Length(240f32),
+                    height: taffy::style::Dimension::Length(240f32),
+                },
+                border: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Length(60f32),
+                    right: taffy::style::LengthPercentage::Length(60f32),
+                    top: taffy::style::LengthPercentage::Length(60f32),
+                    bottom: taffy::style::LengthPercentage::Length(60f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::util::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 240f32, "width of node {:?}. Expected {}. Actual {}", node, 240f32, size.width);
+    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node0, 120f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0, 120f32, size.height);
+    assert_eq!(location.x, 60f32, "x of node {:?}. Expected {}. Actual {}", node0, 60f32, location.x);
+    assert_eq!(location.y, 60f32, "y of node {:?}. Expected {}. Actual {}", node0, 60f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node00).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node00, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node00, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node00, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node01).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node01, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node01, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node01, 50f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node01, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node02).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node02, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node02, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node02, 100f32, location.x);
+    assert_eq!(location.y, 20f32, "y of node {:?}. Expected {}. Actual {}", node02, 20f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node03).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node03, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node03, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node03, 0f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node03, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node04).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node04, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node04, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node04, 50f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node04, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node05).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node05, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node05, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node05, 100f32, location.x);
+    assert_eq!(location.y, 50f32, "y of node {:?}. Expected {}. Actual {}", node05, 50f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node06).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node06, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node06, 20f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node06, 0f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node06, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node07).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node07, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node07, 20f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node07, 50f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node07, 80f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node08).unwrap();
+    assert_eq!(size.width, 40f32, "width of node {:?}. Expected {}. Actual {}", node08, 40f32, size.width);
+    assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node08, 20f32, size.height);
+    assert_eq!(location.x, 100f32, "x of node {:?}. Expected {}. Actual {}", node08, 100f32, location.x);
+    assert_eq!(location.y, 80f32, "y of node {:?}. Expected {}. Actual {}", node08, 80f32, location.y);
+}
diff --git a/tests/generated/grid/mod.rs b/tests/generated/grid/mod.rs
index 6de672606..f953fcee2 100644
--- a/tests/generated/grid/mod.rs
+++ b/tests/generated/grid/mod.rs
@@ -45,24 +45,36 @@ mod grid_absolute_with_padding_and_margin;
 #[cfg(feature = "grid")]
 mod grid_align_content_center;
 #[cfg(feature = "grid")]
+mod grid_align_content_center_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_end;
 #[cfg(feature = "grid")]
+mod grid_align_content_end_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_end_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_align_content_space_around;
 #[cfg(feature = "grid")]
+mod grid_align_content_space_around_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_space_around_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_align_content_space_between;
 #[cfg(feature = "grid")]
+mod grid_align_content_space_between_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_space_between_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_align_content_space_evenly;
 #[cfg(feature = "grid")]
+mod grid_align_content_space_evenly_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_space_evenly_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_align_content_start;
 #[cfg(feature = "grid")]
+mod grid_align_content_start_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_align_content_start_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_align_items_baseline;
@@ -223,26 +235,38 @@ mod grid_hidden;
 #[cfg(feature = "grid")]
 mod grid_justify_content_center;
 #[cfg(feature = "grid")]
+mod grid_justify_content_center_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_center_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_content_end;
 #[cfg(feature = "grid")]
+mod grid_justify_content_end_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_end_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_content_space_around;
 #[cfg(feature = "grid")]
+mod grid_justify_content_space_around_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_space_around_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_content_space_between;
 #[cfg(feature = "grid")]
+mod grid_justify_content_space_between_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_space_between_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_content_space_evenly;
 #[cfg(feature = "grid")]
+mod grid_justify_content_space_evenly_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_space_evenly_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_content_start;
 #[cfg(feature = "grid")]
+mod grid_justify_content_start_negative_space_gap;
+#[cfg(feature = "grid")]
 mod grid_justify_content_start_with_padding_border;
 #[cfg(feature = "grid")]
 mod grid_justify_items_sized_center;