Skip to main content

Transform Origin

Set the origin point for transformations.

View as Markdown
baselinewidely
ClassCSS
tor:btransform-origin: bottom;
tor:bltransform-origin: 0 100%;
tor:brtransform-origin: 100% 100%;
tor:ctransform-origin: center;
tor:ltransform-origin: 0;
tor:rtransform-origin: 100%;
tor:ttransform-origin: top;
tor:tltransform-origin: 0 0;
tor:trtransform-origin: 100% 0;

Variants

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

Breakpoints

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

@xs:tor:lFrom 32rem up.
@sm:tor:lFrom 40rem up.
@md:tor:lFrom 48rem up.
@lg:tor:lFrom 64rem up.
@xl:tor:lFrom 80rem up.
@xxl:tor:lFrom 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:tor:lContainer from 32rem up.
@c:sm:tor:lContainer from 40rem up.
@c:md:tor:lContainer from 48rem up.
@c:lg:tor:lContainer from 64rem up.
@c:xl:tor:lContainer from 80rem up.
@c:xxl:tor:lContainer 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:tor:lOn a touch screen.
@prm:tor:lWith reduced motion on.
@st:tor:lOn the first frame.

States

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

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

Pseudo Elements

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

a::tor:lOn ::after.
b::tor:lOn ::before.
p::tor:lOn ::placeholder.
s::tor:lOn ::selection.