Transforms

Transform Origin

Utilities for sets the origin of an element's transforms.


Variant

Active Checked Child-Selection Dark Mode Disabled Expand First-Last-Selection First-Letter Focus Focus-Visible Focus-Within Fullscreen Group-Focus Group-Hover Hover Landscape Light Mode Portrait Reduce-Motion Responsive Selection-Hover Visited

API

classcss
origin-toptransform-origin: top
origin-bottomtransform-origin: bottom
origin-lefttransform-origin: left
origin-righttransform-origin: right
origin-centertransform-origin: center
origin-top-lefttransform-origin: top left
origin-top-righttransform-origin: top right
origin-bottom-lefttransform-origin: bottom left
origin-bottom-righttransform-origin: bottom right

Usage

Set basic transform-origin with Rotate, Skew, and Scale utilities.

Set the element origin to center.

<img class="origin-center ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-center,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to top-left.

<img class="origin-top-left ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-top-left,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to bottom-right.

<img class="origin-bottom-right ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-bottom-right,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to right.

<img class="origin-right ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-right,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to bottom-right.

<img class="origin-center ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-center,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to bottom-left.

<img class="origin-bottom-left ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-bottom-left,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to left.

<img class="origin-left ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-left,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS

Set the element origin to top-left.

<img class="origin-top-left ... transform rotate-45 ... height-32 width-24" src="...">
HTML
img {
@extend
.origin-top-left,
.transform,
.rotate-45,
.height-32,
.width-24;
}
SCSS