Skip to main content

Border Width

Set the width for element borders.

View as Markdown
baselinewidely
ClassCSS
bw:0border-width: 0;
bw:1border-width: 1px;
bw:2border-width: 2px;
bw:3border-width: 3px;
bw:4border-width: 4px;
bw:5border-width: 5px;
bw:6border-width: 6px;
bw:7border-width: 7px;
bw:8border-width: 8px;

The same values work with bbew, bbsw, byw, bbw, biew, bisw, bxw, blw, brw & btw, as in btw:4.

Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:bw:4.

Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

@xs:bw:4From 32rem up.
@sm:bw:4From 40rem up.
@md:bw:4From 48rem up.
@lg:bw:4From 64rem up.
@xl:bw:4From 80rem up.
@xxl:bw:4From 96rem up.

Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.

@c:xs:bw:4Container from 32rem up.
@c:sm:bw:4Container from 40rem up.
@c:md:bw:4Container from 48rem up.
@c:lg:bw:4Container from 64rem up.
@c:xl:bw:4Container from 80rem up.
@c:xxl:bw:4Container from 96rem up.

Media

Apply a class when the device or the page matches a condition, or on the first frame an element renders.

@pc:bw:4On a touch screen.
@prm:bw:4With reduced motion on.
@st:bw:4On the first frame.

States

Apply a class only while the element is in a state, such as hovered, focused or checked.

h:bw:4On :hover.
f:bw:4On :focus.
fv:bw:4On :focus-visible.
a:bw:4On :active.
d:bw:4On :disabled.
fc:bw:4On :first-child.
c:bw:4On :checked.
e:bw:4On :empty.
fw:bw:4On :focus-within.
i:bw:4On :invalid.
in:bw:4On :indeterminate.
lc:bw:4On :last-child.
nc:bw:4On :nth-child.
r:bw:4On :required.
ro:bw:4On :read-only.
v:bw:4On :valid.

Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

a::bw:4On ::after.
b::bw:4On ::before.
p::bw:4On ::placeholder.
s::bw:4On ::selection.