def lenght_precentage_or_auto(token):
    """``margin-*`` and various other properties validation."""
    length = get_length(token, percentage=True)
    if length:
        return length
    if get_keyword(token) == 'auto':
        return 'auto'
``margin-*`` and various other properties validation.
weasyprint/css/validation/properties.py