def width_height(token):
    """Validation for the ``width`` and ``height`` properties."""
    length = get_length(token, negative=False, percentage=True)
    if length:
        return length
    if get_keyword(token) == 'auto':
        return 'auto'
Validation for the ``width`` and ``height`` properties.
weasyprint/css/validation/properties.py