def _track_size(style, name, values):
    """Compute track size."""
    return_values = []
    for i, value in enumerate(values):
        if i % 2 == 0:
            # line name
            return_values.append(value)
        else:
            # track section
            track_breadth = _compute_track_breadth(style, name, value)
            if track_breadth:
                return_values.append(track_breadth)
            elif value[0] == 'minmax()':
                return_values.append((
                    'minmax()',
                    _compute_track_breadth(style, name, value[1]),
                    _compute_track_breadth(style, name, value[2])))
            elif value[0] == 'fit-content()':
                return_values.append((
                    'fit-content()', length(style, name, value[1])))
            elif value[0] == 'repeat()':
                return_values.append((
                    'repeat()', value[1], _track_size(style, name, value[2])))
    return tuple(return_values)
Compute track size.
weasyprint/css/computed_values.py