From 096f1b28467404e8e82dca5a591d10ae797986a2 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Tue, 25 Jun 2024 14:36:31 +1200 Subject: [PATCH] Translate grid line 0 to auto placement (0 is invalid) --- packages/dom/src/stylo_to_taffy.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/dom/src/stylo_to_taffy.rs b/packages/dom/src/stylo_to_taffy.rs index 3a07e490..96e35816 100644 --- a/packages/dom/src/stylo_to_taffy.rs +++ b/packages/dom/src/stylo_to_taffy.rs @@ -217,6 +217,8 @@ pub(crate) fn grid_line(input: &stylo::GridLine) -> taffy::GridPlacement { taffy::GridPlacement::Auto } else if input.is_span { taffy::style_helpers::span(input.line_num.try_into().unwrap()) + } else if input.line_num == 0 { + taffy::GridPlacement::Auto } else { taffy::style_helpers::line(input.line_num.try_into().unwrap()) }