def display(style, name, value):
    """Compute the ``display`` property."""
    # See https://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo.
    float_ = style.specified['float']
    position = style.specified['position']
    if position in ('absolute', 'fixed') or float_ != 'none' or (
            style.is_root_element):
        if value == ('inline-table',):
            return ('block', 'table')
        elif len(value) == 1 and value[0].startswith('table-'):
            return ('block', 'flow')
        elif value[0] == 'inline':
            if 'list-item' in value:
                return ('block', 'flow', 'list-item')
            else:
                return ('block', 'flow')
    return value
Compute the ``display`` property.
weasyprint/css/computed_values.py