General

mixins

border

@mixin border($widths, $style, $color) { ... }
View source

Description

Ultimate shorthand mixin for border properties.

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$widths

border width property/ properties

Number or Listnone
$style

border style type

Stringnone
$color

border color

Colornone

Output

Border width, style and color properties

Example


border(10px, solid, #BADa55)
//  border: 10px solid #BADa55;

border(10px 20px, dotted dashed, #444 #000)
 // border-top: 10px dotted #444;
 // border-bottom: 10px dotted #444;
 // border-left: 20px dashed #000;
 // border-right: 20px dashed #000;

Throws

  • Check border mixin arguments

    Invalid list length for border mixin arguments