def expand_border_side(tokens, name):
    """Expand the ``border-*`` shorthand properties.

    See https://www.w3.org/TR/CSS21/box.html#propdef-border-top

    """
    for token in tokens:
        if parse_color(token) is not None:
            suffix = '-color'
        elif border_width([token]) is not None:
            suffix = '-width'
        elif border_style([token]) is not None:
            suffix = '-style'
        else:
            raise InvalidValues
        yield suffix, [token]
Expand the ``border-*`` shorthand properties.

See https://www.w3.org/TR/CSS21/box.html#propdef-border-top
weasyprint/css/validation/expanders.py