get-theme-border-width
get-theme-border-width($fallback: 2px);Description
Get the $borderWidth variable if set, if not return $fallback.
Parameters
$fallback (unit)
The fallback width if the $borderWidth variable is not set.
Default: 2px
Return
(unit) Valid unit.
Examples
Get theme $borderWidth variable to use for an elements border
$borderWidth variable to use for an elements border.foo {
border: get-theme-border-width() solid $primaryColor;
}Position a pseudo element so that it fills it's parent, including the border
.bar {
border: get-theme-border-width() solid $secondaryDark;
&:before {
content: '';
@include full(calc(#{get-theme-border-width()} * -1));
background: linear-gradient(20deg, $secondaryDark, transparent);
}
}Updated 6 months ago