border()
@mixin border(
$size: '',
$style: solid,
$color: 'border',
$radius: 'border-radius',
$side: 'all'
) {
// Size.
$width: 'border-width';
@if string.length($size) > 0 {
$width: '#{$width}-#{$size}';
}
// Side.
@if $side == all {
border: get-border($width, $style, $color);
} @else if $side == bottom or $side == left or $side == right or $side == top {
border-#{$side}: get-border($width, $style, $color);
} @else {
@error "Unknown side #{$side}.";
}
// Radius.
@if $radius {
border-radius: get-var($radius);
}
}
Last updated