def length_or_precentage(token):
    """``padding-*`` properties validation."""
    length = get_length(token, negative=False, percentage=True)
    if length:
        return length
``padding-*`` properties validation.
weasyprint/css/validation/properties.py