@classmethod
def flip(class_, align, dir):
    """Flip p_align(ment) if p_dir indicates a right-to-left language"""
    if dir == 'ltr':
        return align
    if align == 'left':
        return 'right'
    if align == 'right':
        return 'left'
    return align
