def _percentage_contribution(box):
    """Return the percentage contribution of a cell, column or column group.

    https://dbaron.org/css/intrinsic/#pct-contrib

    """
    min_width = (
        box.style['min_width'].value if box.style['min_width'] != 'auto' and
        box.style['min_width'].unit == '%' else 0)
    max_width = (
        box.style['max_width'].value if box.style['max_width'] != 'auto' and
        box.style['max_width'].unit == '%' else inf)
    width = (
        box.style['width'].value if box.style['width'] != 'auto' and
        box.style['width'].unit == '%' else 0)
    return max(min_width, min(width, max_width))
Return the percentage contribution of a cell, column or column group.

https://dbaron.org/css/intrinsic/#pct-contrib
weasyprint/layout/preferred.py