Border style

Utilities for controlling the style of an element’s borders.

In this article

Class Properties
.border-solid border-style: solid;
.border-dashed border-style: dashed;
.border-dotted border-style: dotted;
.border-none border-style: none;

Usage

Use .border-{style} to control an element’s border style.

<div class="border border-4 border-solid"></div>
<div class="border border-4 border-dashed"></div>
<div class="border border-4 border-dotted"></div>

Use .border-none to remove the border from an element.

Variants

By default, no responsive or hover-state variants are generated for border style utilities.

Responsive

To include responsive variants like .md:border-dotted, add "border-style" to the $responsive-variants variable in your theme’s _variables.scss file when recompiling your CSS:

$responsive-variants: (
  // ...
  "border-style",
);

Hover-state

To include hover-state variants like .hover:border-dotted, add "border-style" to the $hover-variants variable:

$hover-variants: (
  // ...
  "border-style",
);

Questions or feedback about this article? Let us know