Skip to main content

Writing Mode

Set whether lines of text are laid out horizontally or vertically.

View as Markdown
baselinewidely
ClassCSS
wm:htbwriting-mode: horizontal-tb;
wm:slrwriting-mode: sideways-lr;
wm:srlwriting-mode: sideways-rl;
wm:vlrwriting-mode: vertical-lr;
wm:vrlwriting-mode: vertical-rl;

Variants

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

Breakpoints

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

@xs:wm:srlFrom 32rem up.
@sm:wm:srlFrom 40rem up.
@md:wm:srlFrom 48rem up.
@lg:wm:srlFrom 64rem up.
@xl:wm:srlFrom 80rem up.
@xxl:wm:srlFrom 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:wm:srlContainer from 32rem up.
@c:sm:wm:srlContainer from 40rem up.
@c:md:wm:srlContainer from 48rem up.
@c:lg:wm:srlContainer from 64rem up.
@c:xl:wm:srlContainer from 80rem up.
@c:xxl:wm:srlContainer 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:wm:srlOn a touch screen.
@prm:wm:srlWith reduced motion on.
@st:wm:srlOn the first frame.

States

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

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

Pseudo Elements

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

a::wm:srlOn ::after.
b::wm:srlOn ::before.
p::wm:srlOn ::placeholder.
s::wm:srlOn ::selection.