def validate_non_shorthand(tokens, name, base_url=None, required=False):
    """Validator for non-shorthand properties."""
    if name.startswith('--'):
        # TODO: validate content
        return ((name, tokens),)

    if not required and name not in KNOWN_PROPERTIES:
        raise InvalidValues('unknown property')

    if not required and name not in PROPERTIES:
        raise InvalidValues('property not supported yet')

    function = PROPERTIES[name]
    for token in tokens:
        if check_var_function(token):
            # Found CSS variable, return pending-substitution values.
            return ((name, PendingProperty(tokens, name)),)

    keyword = get_single_keyword(tokens)
    if keyword in ('initial', 'inherit'):
        value = keyword
    else:
        if function.wants_base_url:
            value = function(tokens, base_url)
        else:
            value = function(tokens)
        if value is None:
            raise InvalidValues
    return ((name, value),)
Validator for non-shorthand properties.
weasyprint/css/validation/properties.py