diff --git a/weasyprint/layout/backgrounds.py b/weasyprint/layout/backgrounds.py index a02a7bbca1..ac72c8b22a 100644 --- a/weasyprint/layout/backgrounds.py +++ b/weasyprint/layout/backgrounds.py @@ -230,8 +230,8 @@ def set_canvas_background(page): page.canvas_background = chosen_box.background._replace( # TODO: shouldn’t background-clip be considered here? layers=[ - l._replace(painting_area=painting_area) - for l in chosen_box.background.layers]) + layer._replace(painting_area=painting_area) + for layer in chosen_box.background.layers]) chosen_box.background = None else: page.canvas_background = None