Borders
Utilities for controlling the style of an element's borders.
Class | Styles |
---|---|
border-solid | border-style: solid; |
border-dashed | border-style: dashed; |
border-dotted | border-style: dotted; |
border-double | border-style: double; |
border-hidden | border-style: hidden; |
border-none | border-style: none; |
divide-solid | & > :not(:last-child) {
border-style: solid;
} |
divide-dashed | & > :not(:last-child) {
border-style: dashed;
} |
divide-dotted | & > :not(:last-child) {
border-style: dotted;
} |
divide-double | & > :not(:last-child) {
border-style: double;
} |
divide-hidden | & > :not(:last-child) {
border-style: hidden;
} |
divide-none | & > :not(:last-child) {
border-style: none;
} |
Use utilities like border-solid
and border-dotted
to control an element's border style:
Use the border-none
utility to remove an existing border from an element:
This is most commonly used to remove a border style that was applied at a smaller breakpoint.
Use utilities like divide-dashed
and divide-dotted
control the border style between child elements
Prefix a border-style
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="border-solid md:border-dotted ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.