Skip to main content

Word Break

Specify how words should break when reaching the edge of a line.

View as Markdown
baselinewidely
ClassCSS
wb:apword-break: auto-phrase;
wb:baword-break: break-all;
wb:kaword-break: keep-all;
wb:nword-break: normal;

Variants

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

Breakpoints

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

@xs:wb:kaFrom 32rem up.
@sm:wb:kaFrom 40rem up.
@md:wb:kaFrom 48rem up.
@lg:wb:kaFrom 64rem up.
@xl:wb:kaFrom 80rem up.
@xxl:wb:kaFrom 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:wb:kaContainer from 32rem up.
@c:sm:wb:kaContainer from 40rem up.
@c:md:wb:kaContainer from 48rem up.
@c:lg:wb:kaContainer from 64rem up.
@c:xl:wb:kaContainer from 80rem up.
@c:xxl:wb:kaContainer 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:wb:kaOn a touch screen.
@prm:wb:kaWith reduced motion on.
@st:wb:kaOn the first frame.

States

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

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

Pseudo Elements

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

a::wb:kaOn ::after.
b::wb:kaOn ::before.
p::wb:kaOn ::placeholder.
s::wb:kaOn ::selection.