Skip to main content

Text Transform

Set the capitalization of text.

View as Markdown
baselinewidely
ClassCSS
tt:ctext-transform: capitalize;
tt:ltext-transform: lowercase;
tt:nonetext-transform: none;
tt:utext-transform: uppercase;

Variants

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

Breakpoints

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

@xs:tt:noneFrom 32rem up.
@sm:tt:noneFrom 40rem up.
@md:tt:noneFrom 48rem up.
@lg:tt:noneFrom 64rem up.
@xl:tt:noneFrom 80rem up.
@xxl:tt:noneFrom 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:tt:noneContainer from 32rem up.
@c:sm:tt:noneContainer from 40rem up.
@c:md:tt:noneContainer from 48rem up.
@c:lg:tt:noneContainer from 64rem up.
@c:xl:tt:noneContainer from 80rem up.
@c:xxl:tt:noneContainer 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:tt:noneOn a touch screen.
@prm:tt:noneWith reduced motion on.
@st:tt:noneOn the first frame.

States

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

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

Pseudo Elements

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

a::tt:noneOn ::after.
b::tt:noneOn ::before.
p::tt:noneOn ::placeholder.
s::tt:noneOn ::selection.