Border utility classes for WovenUI.
The @breakpoint suffix exists for border, border-{0|1|2|4|8}, rounded, rounded-{xs|sm|md|lg|xl|2xl|full|none}, square and pill (border@md, rounded-lg@lg); per-side border, border style and per-side or corner radius classes have none.
hover:, focus:, active: and group-hover: variants exist only for border-{0|1|2|4|8} and border-{solid|dashed|dotted|double|none}, and have no breakpoint suffix.
Generated from the doc blocks in the core source when the site is built, so it always matches the current release of @wovenui/core. Every example is compiled against core during the build; open Compiled CSS under an example to see its output. Guide: Borders . The A to Z index lists every public mixin and function.
Mixins and functions get-rounded-value() border border-top border-right border-bottom border-left border-start border-end rounded rounded-t rounded-r rounded-b rounded-l rounded-tl rounded-tr rounded-br rounded-bl rounded-s rounded-e rounded-ss rounded-se rounded-es rounded-ee border-style border-color border-all pill
get-rounded-value() function Resolves a border radius: a $border-radii key gives its token, null gives the md token, and values with units stay raw.
A unitless number that is not a key, such as 4, raises an error.
@function get-rounded-value ( $val , $label: " get-rounded-value " )
Parameter Type Default Description $valString|Length|NullRequired A $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc(), var() or null $labelString"get-rounded-value"Name that starts error messages; the rounded mixins pass their own name
Returns String|Length A var(--wu-radius-*) reference or the raw value Example
border-radius : get-rounded-value ( lg ); // var(--wu-radius-lg)
Compiled CSS border-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:91
border mixin Draws a border on all sides with a width key, a style and a color that defaults to the border-regular token.
A unitless width that is not a key, such as 3, raises an error; an unknown style raises an error.
@mixin border ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word (regular, strong, control, control-hover, focus), color value or var(); resolved like border-color()
Output border-width, border-style: var(--wu-border-style), border-color and --wu-border-style; a zero width emits border-width onlyExample 1
@include border ( 1 ) ; // var(--wu-border-width-1), solid, var(--wu-border-regular)
Compiled CSS border-width : var ( --wu-border-width-1 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border ( 2 , dashed , danger ) ;
Compiled CSS border-width : var ( --wu-border-width-2 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-danger );
--wu-border-style : dashed ;
Example 3
@include apply ( border ( 1 , solid , control ), rounded ( md ) ) ;
Compiled CSS border-width : var ( --wu-border-width-1 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-border-control );
--wu-border-style : solid ;
border-radius : var ( --wu-radius-md );
See also: border-color , border-style , border-all . Source: utilities/_borders.scss:139
border-top mixin Draws a border on the top side in the border-regular color unless a color is given.
@mixin border-top ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
Compiled CSS border-top-width : var ( --wu-border-width-1 );
border-top-style : var ( --wu-border-style );
border-top-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-top ( 2 , dashed , brand ) ;
Compiled CSS border-top-width : var ( --wu-border-width-2 );
border-top-style : var ( --wu-border-style );
border-top-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:192
border-right mixin Draws a border on the right side (physical) in the border-regular color unless a color is given.
@mixin border-right ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
@include border-right ( 1 ) ;
Compiled CSS border-right-width : var ( --wu-border-width-1 );
border-right-style : var ( --wu-border-style );
border-right-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-right ( 2 , dashed , brand ) ;
Compiled CSS border-right-width : var ( --wu-border-width-2 );
border-right-style : var ( --wu-border-style );
border-right-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:210
border-bottom mixin Draws a border on the bottom side in the border-regular color unless a color is given.
@mixin border-bottom ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
@include border-bottom ( 1 ) ;
Compiled CSS border-bottom-width : var ( --wu-border-width-1 );
border-bottom-style : var ( --wu-border-style );
border-bottom-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-bottom ( 2 , dashed , brand ) ;
Compiled CSS border-bottom-width : var ( --wu-border-width-2 );
border-bottom-style : var ( --wu-border-style );
border-bottom-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:228
border-left mixin Draws a border on the left side (physical) in the border-regular color unless a color is given.
@mixin border-left ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
Compiled CSS border-left-width : var ( --wu-border-width-1 );
border-left-style : var ( --wu-border-style );
border-left-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-left ( 2 , dashed , brand ) ;
Compiled CSS border-left-width : var ( --wu-border-width-2 );
border-left-style : var ( --wu-border-style );
border-left-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:246
border-start mixin Draws a border on the inline start side (left in LTR, right in RTL) in the border-regular color unless a color is given.
@mixin border-start ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
@include border-start ( 1 ) ;
Compiled CSS border-inline-start-width : var ( --wu-border-width-1 );
border-inline-start-style : var ( --wu-border-style );
border-inline-start-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-start ( 2 , dashed , brand ) ;
Compiled CSS border-inline-start-width : var ( --wu-border-width-2 );
border-inline-start-style : var ( --wu-border-style );
border-inline-start-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:264
border-end mixin Draws a border on the inline end side (right in LTR, left in RTL) in the border-regular color unless a color is given.
@mixin border-end ( $val , $style : solid , $color : null )
Parameter Type Default Description $valNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length such as 3px $styleStringsolidsolid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|Color|NullnullA role, palette name, theme word, color value or var(), resolved like border-color(); null gives the border-regular token
Example 1
Compiled CSS border-inline-end-width : var ( --wu-border-width-1 );
border-inline-end-style : var ( --wu-border-style );
border-inline-end-color : var ( --wu-border-regular );
--wu-border-style : solid ;
Example 2
@include border-end ( 2 , dashed , brand ) ;
Compiled CSS border-inline-end-width : var ( --wu-border-width-2 );
border-inline-end-style : var ( --wu-border-style );
border-inline-end-color : var ( --wu-brand );
--wu-border-style : dashed ;
See also: border , border-color . Source: utilities/_borders.scss:282
rounded mixin Rounds all corners with a $border-radii key (md when omitted) or a raw length.
A unitless number that is not a key, such as 4, raises an error.
@mixin rounded ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example 1
@include rounded ; // border-radius: var(--wu-radius-md)
Compiled CSS border-radius : var ( --wu-radius-md );
Example 2
@include apply ( rounded ( full ), border ( 2 , solid , brand ) ) ;
Compiled CSS border-radius : var ( --wu-radius-full );
border-width : var ( --wu-border-width-2 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-brand );
--wu-border-style : solid ;
border-radius on MDN
See also: pill , get-rounded-value() . Source: utilities/_borders.scss:301
rounded-t mixin Rounds the top left and top right corners with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-t ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-top-left-radius : var ( --wu-radius-lg );
border-top-right-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:312
rounded-r mixin Rounds the top right and bottom right corners (physical) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-r ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-top-right-radius : var ( --wu-radius-lg );
border-bottom-right-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:326
rounded-b mixin Rounds the bottom left and bottom right corners with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-b ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-bottom-left-radius : var ( --wu-radius-lg );
border-bottom-right-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:340
rounded-l mixin Rounds the top left and bottom left corners (physical) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-l ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-top-left-radius : var ( --wu-radius-lg );
border-bottom-left-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:354
rounded-tl mixin Rounds the top left corner with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-tl ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-top-left-radius : var ( --wu-radius-lg );
border-top-left-radius on MDN
See also: rounded . Source: utilities/_borders.scss:369
rounded-tr mixin Rounds the top right corner with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-tr ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-top-right-radius : var ( --wu-radius-lg );
border-top-right-radius on MDN
See also: rounded . Source: utilities/_borders.scss:383
rounded-br mixin Rounds the bottom right corner with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-br ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-bottom-right-radius : var ( --wu-radius-lg );
border-bottom-right-radius on MDN
See also: rounded . Source: utilities/_borders.scss:397
rounded-bl mixin Rounds the bottom left corner with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-bl ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-bottom-left-radius : var ( --wu-radius-lg );
border-bottom-left-radius on MDN
See also: rounded . Source: utilities/_borders.scss:411
rounded-s mixin Rounds both inline start corners (border-start-start-radius and border-end-start-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-s ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-start-start-radius : var ( --wu-radius-lg );
border-end-start-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:424
rounded-e mixin Rounds both inline end corners (border-start-end-radius and border-end-end-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-e ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-start-end-radius : var ( --wu-radius-lg );
border-end-end-radius : var ( --wu-radius-lg );
See also: rounded . Source: utilities/_borders.scss:438
rounded-ss mixin Rounds the block start, inline start corner (border-start-start-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-ss ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-start-start-radius : var ( --wu-radius-lg );
border-start-start-radius on MDN
See also: rounded . Source: utilities/_borders.scss:453
rounded-se mixin Rounds the block start, inline end corner (border-start-end-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-se ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-start-end-radius : var ( --wu-radius-lg );
border-start-end-radius on MDN
See also: rounded . Source: utilities/_borders.scss:465
rounded-es mixin Rounds the block end, inline start corner (border-end-start-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-es ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-end-start-radius : var ( --wu-radius-lg );
border-end-start-radius on MDN
See also: rounded . Source: utilities/_borders.scss:477
rounded-ee mixin Rounds the block end, inline end corner (border-end-end-radius) with a $border-radii key (md when omitted) or a raw length.
@mixin rounded-ee ( $val : null )
Parameter Type Default Description $valString|Length|NullnullA $border-radii key (xs, sm, md, lg, xl, 2xl, full, none), a length, calc() or var()
Example
Compiled CSS border-end-end-radius : var ( --wu-radius-lg );
border-end-end-radius on MDN
See also: rounded . Source: utilities/_borders.scss:489
border-style mixin Sets --wu-border-style, which changes the style of borders drawn by border(), border-top() and the other side mixins on the same element.
Include it after the border mixin, which also writes --wu-border-style; an unknown style raises an error.
@mixin border-style ( $style )
Parameter Type Default Description $styleStringRequired solid, dashed, dotted, double, none, a CSS-wide keyword or var()
Output --wu-border-style only; it draws nothing without a border mixin or classExample
@include border-style ( dashed ) ;
Compiled CSS border-width : var ( --wu-border-width-2 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-border-regular );
--wu-border-style : solid ;
--wu-border-style : dashed ;
See also: border . Source: utilities/_borders.scss:506
border-color mixin Sets border-color from a role, palette name, theme word or color, emitting the matching var(--wu-*) token.
Roles give their fill {role} and palette names give {hue}-500; a shade outside 50 to 950 raises an error, and a raw color with a shade is shaded at compile time.
@mixin border-color ( $color , $shade : null )
Parameter Type Default Description $colorString|ColorRequired A role (brand, danger), role state (danger-border, brand-hover), palette name (red), theme word (regular, strong, control, control-hover, focus), color value or var() $shadeNumber|NullnullA shade stop (50, 100 to 900, 950) for a role or palette name
Example 1
@include border-color ( regular ) ; // var(--wu-border-regular)
Compiled CSS border-color : var ( --wu-border-regular );
Example 2
@include apply ( border ( 1 ), border-color ( danger-border ) ) ;
Compiled CSS border-width : var ( --wu-border-width-1 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-border-regular );
--wu-border-style : solid ;
border-color : var ( --wu-danger-border );
Example 3
@include border-color ( purple , 300 ) ; // var(--wu-purple-300)
Compiled CSS border-color : var ( --wu-purple-300 );
border-color on MDN
See also: border , bg , text-color . Source: utilities/_borders.scss:531
border-all mixin Draws a border on all sides with a width, a style and a color, all required; the same output as border() with every argument given.
The style goes through --wu-border-style, so border-style() and .border-{style} classes change it, as with border().
@mixin border-all ( $width , $style , $color )
Parameter Type Default Description $widthNumber|LengthRequired A $border-widths key (0, 1, 2, 4, 8) giving var(--wu-border-width-*), or a length $styleStringRequired solid, dashed, dotted, double, none, a CSS-wide keyword or var(); written to --wu-border-style $colorString|ColorRequired A role, palette name, theme word, color value or var(); resolved like border-color()
Example
@include border-all ( 1 , solid , strong ) ;
Compiled CSS border-width : var ( --wu-border-width-1 );
border-style : var ( --wu-border-style );
border-color : var ( --wu-border-strong );
--wu-border-style : solid ;
See also: border . Source: utilities/_borders.scss:546
pill mixin Rounds all corners fully with the full radius token, var(--wu-radius-full).
Example
@include apply ( pill, px ( 3 ) ) ;
Compiled CSS border-radius : var ( --wu-radius-full );
padding-inline : var ( --wu-space-3 );
See also: rounded . Source: utilities/_borders.scss:556