$bdr-sides: ( '': '', t: '-top', r: '-right', b: '-bottom', l: '-left' );
$bdr: (
    width: (
        s: 1px, m: 2px, l: 3px,
    ),
    style: (
        sld: solid, dsh: dashed, dot: dotted
    ),
    color: (
        drk: rgba(color(drk), 0.15), lte: rgba(color(lte), 0.15),
    )
);
$bdr-types: (
    typ1: ( 's', 'sld', 'drk' ),
    typ2: ( 'm', 'dot', 'drk' ),
    typ3: ( 'l', 'dsh', 'lte' ),
);

@function border($type) {
    $widths: map-get($bdr, 'width');
    $styles: map-get($bdr, 'style');
    $colors: map-get($bdr, 'color');

    $width: nth($type, 1);
    $style: nth($type, 2);
    $color: nth($type, 3);
    
    $w: map-get($widths, $width);
    $s: map-get($styles, $style);
    $c: map-get($colors, $color);
    @return $w $s $c;
}

.bdr {
    @each $class, $side in $bdr-sides {
        &\:#{$class} {
            &0 {
                border#{$side}: 0;
            }
            &1 {
                border#{$side}: 1px solid;
            }
        }
    }
    @each $class, $array in $bdr-types {
        &\:#{$class} {
            border: border($array);
        }
    }
    &-rad {
        &\:50 {
            border-radius: 50%;
        }
    }
}
