Skip to main content

Text Overflow

Set how overflowing text is signaled to the user.

View as Markdown
baselinewidely
ClassCSS
to:ctext-overflow: clip;
to:etext-overflow: ellipsis;

Variants

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

Breakpoints

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

@xs:to:eFrom 32rem up.
@sm:to:eFrom 40rem up.
@md:to:eFrom 48rem up.
@lg:to:eFrom 64rem up.
@xl:to:eFrom 80rem up.
@xxl:to:eFrom 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:to:eContainer from 32rem up.
@c:sm:to:eContainer from 40rem up.
@c:md:to:eContainer from 48rem up.
@c:lg:to:eContainer from 64rem up.
@c:xl:to:eContainer from 80rem up.
@c:xxl:to:eContainer 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:to:eOn a touch screen.
@prm:to:eWith reduced motion on.
@st:to:eOn the first frame.

States

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

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

Pseudo Elements

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

a::to:eOn ::after.
b::to:eOn ::before.
p::to:eOn ::placeholder.
s::to:eOn ::selection.