Border Utilities

The border utilities provide a set of classes to adjust the border-color, border-radius, border-style, and border-width properties of elements.

Bordered

Applies the default border styling to an element.

css
  .bordered {
    border-width:
      var(--graupl-border-top-width)
      var(--graupl-border-right-width)
      var(--graupl-border-bottom-width)
      var(--graupl-border-left-width);
    border-radius:
      var(--graupl-border-top-left-radius)
      var(--graupl-border-top-right-radius)
      var(--graupl-border-bottom-right-radius)
      var(--graupl-border-bottom-left-radius);
    border-style:
      var(--graupl-border-top-style)
      var(--graupl-border-right-style)
      var(--graupl-border-bottom-style)
      var(--graupl-border-left-style)
  }

Border Color

Class NamePropertyValue
.border-primaryborder-colorvar(--graupl-theme-active--primary)
.border-primary-100border-colorvar(--graupl-theme-active--primary--100)
.border-primary-200border-colorvar(--graupl-theme-active--primary--200)
.border-primary-300border-colorvar(--graupl-theme-active--primary--300)
.border-primary-400border-colorvar(--graupl-theme-active--primary--400)
.border-primary-500border-colorvar(--graupl-theme-active--primary--500)
.border-primary-600border-colorvar(--graupl-theme-active--primary--600)
.border-primary-700border-colorvar(--graupl-theme-active--primary--700)
.border-primary-800border-colorvar(--graupl-theme-active--primary--800)
.border-primary-900border-colorvar(--graupl-theme-active--primary--900)
.border-secondaryborder-colorvar(--graupl-theme-active--secondary)
.border-secondary-100border-colorvar(--graupl-theme-active--secondary--100)
.border-secondary-200border-colorvar(--graupl-theme-active--secondary--200)
.border-secondary-300border-colorvar(--graupl-theme-active--secondary--300)
.border-secondary-400border-colorvar(--graupl-theme-active--secondary--400)
.border-secondary-500border-colorvar(--graupl-theme-active--secondary--500)
.border-secondary-600border-colorvar(--graupl-theme-active--secondary--600)
.border-secondary-700border-colorvar(--graupl-theme-active--secondary--700)
.border-secondary-800border-colorvar(--graupl-theme-active--secondary--800)
.border-secondary-900border-colorvar(--graupl-theme-active--secondary--900)
.border-tertiaryborder-colorvar(--graupl-theme-active--tertiary)
.border-tertiary-100border-colorvar(--graupl-theme-active--tertiary--100)
.border-tertiary-200border-colorvar(--graupl-theme-active--tertiary--200)
.border-tertiary-300border-colorvar(--graupl-theme-active--tertiary--300)
.border-tertiary-400border-colorvar(--graupl-theme-active--tertiary--400)
.border-tertiary-500border-colorvar(--graupl-theme-active--tertiary--500)
.border-tertiary-600border-colorvar(--graupl-theme-active--tertiary--600)
.border-tertiary-700border-colorvar(--graupl-theme-active--tertiary--700)
.border-tertiary-800border-colorvar(--graupl-theme-active--tertiary--800)
.border-tertiary-900border-colorvar(--graupl-theme-active--tertiary--900)
.border-transparentborder-colortransparent

Border Radius

Class NamePropertyValue
.border-radius-roundedborder-radius100vw
.border-radius-squaredborder-radius0
.border-radius-0border-radiusvar(--graupl-spacer-0)
.border-radius-1border-radiusvar(--graupl-spacer-1)
.border-radius-2border-radiusvar(--graupl-spacer-2)
.border-radius-3border-radiusvar(--graupl-spacer-3)
.border-radius-4border-radiusvar(--graupl-spacer-4)
.border-radius-5border-radiusvar(--graupl-spacer-5)
.border-radius-6border-radiusvar(--graupl-spacer-6)
.border-radius-7border-radiusvar(--graupl-spacer-7)
.border-radius-8border-radiusvar(--graupl-spacer-8)
.border-radius-9border-radiusvar(--graupl-spacer-9)
.border-radius-10border-radiusvar(--graupl-spacer-10)

Border Style

Class NamePropertyValue
.border-solidborder-stylesolid
.border-dashedborder-styledashed
.border-dottedborder-styledotted
.border-doubleborder-styledouble
.border-grooveborder-stylegroove
.border-ridgeborder-styleridge
.border-insetborder-styleinset
.border-outsetborder-styleoutset
.border-noneborder-stylenone

Border Width

Class NamePropertyValue
.border-thickborder-widththick
.border-thinborder-widththin
.border-mediumborder-widthmedium
.border-0border-widthvar(--graupl-spacer-0)
.border-1border-widthvar(--graupl-spacer-1)
.border-2border-widthvar(--graupl-spacer-2)
.border-3border-widthvar(--graupl-spacer-3)
.border-4border-widthvar(--graupl-spacer-4)
.border-5border-widthvar(--graupl-spacer-5)
.border-6border-widthvar(--graupl-spacer-6)
.border-7border-widthvar(--graupl-spacer-7)
.border-8border-widthvar(--graupl-spacer-8)
.border-9border-widthvar(--graupl-spacer-9)
.border-10border-widthvar(--graupl-spacer-10)

Customization

To customize the border utilities, you can use the following variables.

VariableDescriptionDefault Value
$selector-baseBase selector for utility classes."."
$selector-prefixThe selector prefix for all utility classes.""
$selector-suffixThe selctor suffix for all utility classes.""
$selector-separatorThe selector separator for all utility classes.""
$use-importantAppends !important to generated utility declarations.true
$generate-base-utilitiesGenerates the base utility classes.true
$screen-awareEnables screen-aware utility variants.false
$theme-awareEnables theme-aware utility variants.false
$scheme-awareEnables scheme-aware utility variants.false
$state-awareEnables state-aware utility variants.false
$container-awareEnables container-aware utility variants.false
$screen-aware-selector-prefixPrefix to the screen-aware portion of utility selectors.""
$screen-aware-selector-suffixSuffix to the screen-aware portion of utility selectors.""
$screen-aware-selector-separatorSeparator inserted for screen-aware utility selectors."\\:"
$theme-aware-selector-prefixPrefix to the theme-aware portion of utility selectors.""
$theme-aware-selector-suffixSuffix to the theme-aware portion of utility selectors."-theme"
$theme-aware-selector-separatorSeparator inserted for theme-aware utility selectors."\\:"
$scheme-aware-selector-prefixPrefix to the scheme-aware portion of utility selectors.""
$scheme-aware-selector-suffixSuffix to the scheme-aware portion of utility selectors."-mode"
$scheme-aware-selector-separatorSeparator inserted for scheme-aware utility selectors."\\:"
$state-aware-selector-prefixPrefix to the state-aware portion of utility selectors.""
$state-aware-selector-suffixSuffix to the state-aware portion of utility selectors.""
$state-aware-selector-separatorSeparator inserted for state-aware utility selectors."\\:"
$container-aware-selector-prefixPrefix to the container-aware portion of utility selectors."cq\\:"
$container-aware-selector-suffixSuffix to the container-aware portion of utility selectors.""
$container-aware-selector-separatorSeparator inserted for container-aware utility selectors."\\:"
$utility-propertiesMap of utility properties.()
$utility-valuesMap of utility values.()
$utility-mapMap of utility property/value pairs.()
$bordered-selectorThe selector for the bordered class."bordered"

Responsive Variants

Generating responsive utility classes can be done by setting $screen-aware, $theme-aware, $scheme-aware, $state-aware, or $container-aware to true.

By default, no responsive utility classes are generated for border.

✏️ Note

For more information on responsive variants, refer to the Responsive utility classes documentation.