Skip to main content

Text Orientation

Set the orientation of text characters.

View as Markdown
baselinewidely
ClassCSS
to:mtext-orientation: mixed;
to:utext-orientation: upright;
to:srtext-orientation: sideways-right;
to:vtext-orientation: sideways;

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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