def test_canvas_background_size(assert_pixels):
    assert_pixels('''
        __________
        __________
        __RRRRRR__
        __RGGGGR__
        __RRRRRR__
        __BBBBBB__
        __BBBBBB__
        __BBBBBB__
        __________
        __________
    ''', '''
      <style>
         @page { size: 10px; margin: 2px }
         /* html’s background propagates to the whole canvas */
         html { background: linear-gradient(
           red 0, red 50%, blue 50%, blue 100%); }
         /* html has a background, so body’s does not propagate */
         body { margin: 1px; background: lime; height: 1px }
      </style>
      <body>
    ''')
,
tests/draw/test_background.py