Beispiel #1
0
def Triangle_bottom_left(color, size, include_base=False, **kwargs):
    """Rule for a CSS triangle in bottom left corner."""
    rkw = dict \
        ( kwargs
        , border_color = C_TRBL0 (b = color)
        , border_width = TRBL    (0, size, size, 0)
        )
    return _rule(rkw, include_base=include_base)
Beispiel #2
0
def Triangle_top_right(color, size, include_base=False, **kwargs):
    """Rule for a CSS triangle in top right corner."""
    rkw = dict \
        ( kwargs
        , border_color = C_TRBL0 (t = color)
        , border_width = TRBL    (size, 0, 0, size)
        )
    return _rule(rkw, include_base=include_base)
Beispiel #3
0
def Triangle_up(color, long, short=None, include_base=False, **kwargs):
    """Rule for a CSS triangle pointing up with `color`."""
    if short is None:
        short = long
    rkw = dict \
        ( kwargs
        , border_color = C_TRBL0 (b = color)
        , border_width = TRBL    (0, short, long, short)
        )
    return _rule(rkw, include_base=include_base)
Beispiel #4
0
def Trapezoid(color, size_b, size_t=None, **kwargs):
    """Rule for a CSS trapezoid."""
    if size_t is None:
        size_t = size_b // 2
    size_lr = size_b - size_t
    rkw = dict \
        ( kwargs
        , border_color = C_TRBL0 (b = color)
        , border_width = TRBL    (0, size_lr, size_b, size_lr)
        , height       = 0
        , width        = size_b
        )
    return _rule(rkw)