Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@single_keyword
def clear(keyword):
"""``clear`` property validation."""
return keyword in ('left', 'right', 'both', 'none')
@single_keyword
def caption_side(keyword):
"""``caption-side`` properties validation."""
return keyword in ('top', 'bottom')
@single_keyword
def text_decoration_style(keyword):
"""``text-decoration-style`` property validation."""
if keyword in ('solid', 'double', 'dotted', 'dashed', 'wavy'):
return keyword
@single_keyword
def table_layout(keyword):
"""Validation for the ``table-layout`` property"""
if keyword in ('fixed', 'auto'):
return keyword
@single_keyword
def text_align(keyword):
"""``text-align`` property validation."""
return keyword in ('left', 'right', 'center', 'justify')
@single_keyword
def text_transform(keyword):
"""``text-align`` property validation."""
return keyword in (
'none', 'uppercase', 'lowercase', 'capitalize', 'full-width')
@single_keyword
def image_rendering(keyword):
"""Validation for ``image-rendering``."""
return keyword in ('auto', 'crisp-edges', 'pixelated')
@single_keyword
def font_variant_caps(keyword):
return keyword in (
'normal', 'small-caps', 'all-small-caps', 'petite-caps',
'all-petite-caps', 'unicase', 'titling-caps')
@single_keyword
def box_decoration_break(keyword):
"""``box-decoration-break`` property validation."""
return keyword in ('slice', 'clone')
@single_keyword
def border_style(keyword):
"""``border-*-style`` properties validation."""
return keyword in ('none', 'hidden', 'dotted', 'dashed', 'double',
'inset', 'outset', 'groove', 'ridge', 'solid')