def flex_direction(keyword):
    """``flex-direction`` property validation."""
    return keyword in ('row', 'row-reverse', 'column', 'column-reverse')
``flex-direction`` property validation.
weasyprint/css/validation/properties.py