Skip to main content

Translate

Set the translation for an element.

View as Markdown
baselinewidely

The same values work with ttx & tty, as in tty:4.

Variants

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

Breakpoints

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

@xs:tr:4From 32rem up.
@sm:tr:4From 40rem up.
@md:tr:4From 48rem up.
@lg:tr:4From 64rem up.
@xl:tr:4From 80rem up.
@xxl:tr:4From 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:tr:4Container from 32rem up.
@c:sm:tr:4Container from 40rem up.
@c:md:tr:4Container from 48rem up.
@c:lg:tr:4Container from 64rem up.
@c:xl:tr:4Container from 80rem up.
@c:xxl:tr:4Container 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:tr:4On a touch screen.
@prm:tr:4With reduced motion on.
@st:tr:4On the first frame.

States

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

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

Pseudo Elements

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

a::tr:4On ::after.
b::tr:4On ::before.
p::tr:4On ::placeholder.
s::tr:4On ::selection.

Negative

Put a minus after the colon to negate a value.

tr:-4A minus after the colon.