# Path: weasyprint/css/properties.py
# KNOWN_PROPERTIES = set(name.replace('_', '-') for name in INITIAL_VALUES)
# 
# Path: tests/testing_utils.py
# def render_pages(html_content):
#     """Lay out a document and return a list of PageBox objects."""
#     return [
#         page._page_box for page in
#         FakeHTML(string=html_content, base_url=BASE_URL).render().pages]


import pytest
from weasyprint.css.properties import KNOWN_PROPERTIES
from .testing_utils import render_pages as parse
        html { --foo: 10px }
        body { --var: var(--foo) }
        p { width: var(--var) }
      </style>
      <p></p>
    ''')
    html, = page.children
    body, = html.children
    paragraph, = body.children
    assert paragraph.width == 10


def test_variable_partial_1():
    page, = parse('''
      <style>
        html { --var: 10px }
        div { margin: 0 0 0 var(--var) }
      </style>
      <div></div>
    ''')
    html, = page.children
    body, = html.children
    div, = body.children
    assert div.margin_top == 0
    assert div.margin_right == 0
    assert div.margin_bottom == 0
    assert div.margin_left == 10


def test_variable_initial():

# Path: weasyprint/css/properties.py
# KNOWN_PROPERTIES = set(name.replace('_', '-') for name in INITIAL_VALUES)
# 
# Path: tests/testing_utils.py
# def render_pages(html_content):
#     """Lay out a document and return a list of PageBox objects."""
#     return [
#         page._page_box for page in
#         FakeHTML(string=html_content, base_url=BASE_URL).render().pages]


# Path: tests/test_variables.py
import pytest
from weasyprint.css.properties import KNOWN_PROPERTIES
from .testing_utils import render_pages as parse

        html { --foo: 10px }
        body { --var: var(--foo) }
        p { width: var(--var) }
      </style>
      <p></p>
    ''')
    html, = page.children
    body, = html.children
    paragraph, = body.children
    assert paragraph.width == 10


def test_variable_partial_1():
    page, = parse('''
      <style>
        html { --var: 10px }
        div { margin: 0 0 0 var(--var) }
      </style>
      <div></div>
    ''')
    html, = page.children
    body, = html.children
    div, = body.children
    assert div.margin_top == 0
    assert div.margin_right == 0
    assert div.margin_bottom == 0
    assert div.margin_left == 10


def test_variable_initial():

    page, = parse('''