diff --git a/tests/layout/test_grid.py b/tests/layout/test_grid.py index 539c2ff86..06d896390 100644 --- a/tests/layout/test_grid.py +++ b/tests/layout/test_grid.py @@ -360,6 +360,41 @@ def test_grid_template_areas_extra_span_dense(): assert article.width == 9 +@assert_no_logs +def test_grid_area_multiple_values(): + page, = render_pages(''' + +
+
a
+
b
+
c
+
+ ''') + html, = page.children + body, = html.children + article, = body.children + div_a, div_b, div_c = article.children + assert div_a.position_x == div_b.position_x == 0 + assert div_c.position_x == 5 + assert div_b.position_y == 0 + assert div_a.position_y == div_c.position_y == 2 + assert div_a.height == div_b.height == div_c.height == 2 + assert div_a.width == div_c.width == 5 + assert div_b.width == 10 + assert article.width == 10 + + @assert_no_logs def test_grid_template_repeat_fr(): page, = render_pages(''' diff --git a/weasyprint/css/validation/expanders.py b/weasyprint/css/validation/expanders.py index cde3807dd..a9cb5efb0 100644 --- a/weasyprint/css/validation/expanders.py +++ b/weasyprint/css/validation/expanders.py @@ -900,7 +900,7 @@ def expand_grid_column_row(tokens, name): def expand_grid_area(tokens, name): """Expand the ``grid-area`` property.""" tokens_list = _expand_grid_column_row_area(tokens, 4) - sides = ('row-start', 'row-end', 'column-start', 'column-end') + sides = ('row-start', 'column-start', 'row-end', 'column-end') for tokens, side in zip(tokens_list, sides): yield f'grid-{side}', tokens