rotate

Class Description

rotate

Sets rotation via --rotate. E.g. 45deg, -90deg.

CSS Rules

.rotate {
  rotate: var(--rotate);
}

Usage

The .rotate class is flagged as a value-driven selector. The variable --rotate is required.
<element class="rotate" style="--rotate: /* value */;" />

Responsive

Prefix .rotate utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:rotate" style="--md-rotate: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="rotate:hover" style="--rotate-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="rotate:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before rotate::before" style="--rotate-before: /* value */;" />

<element class="content-after rotate::after" style="--rotate-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="rotate=value" />

<!-- Output -->
<element class="rotate" style="--rotate: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.rotate Sets rotation via --rotate. E.g. 45deg, -90deg.

rotate-x

Sets 3D X-axis rotation via --rotate-x. E.g. 180deg.

CSS Rules

.rotate-x {
  --tw-rotate-x: rotateX(var(--rotate-x));
  transform: rotateX(var(--rotate-x));
}

Usage

The .rotate-x class is flagged as a value-driven selector. The variable --rotate-x is required.
<element class="rotate-x" style="--rotate-x: /* value */;" />

Responsive

Prefix .rotate-x utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:rotate-x" style="--md-rotate-x: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="rotate-x:hover" style="--rotate-x-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="rotate-x:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before rotate-x::before" style="--rotate-x-before: /* value */;" />

<element class="content-after rotate-x::after" style="--rotate-x-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="rotate-x=value" />

<!-- Output -->
<element class="rotate-x" style="--rotate-x: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.rotate-x Sets 3D X-axis rotation via --rotate-x. E.g. 180deg.

rotate-y

Sets 3D Y-axis rotation via --rotate-y. E.g. 180deg.

CSS Rules

.rotate-y {
  --tw-rotate-y: rotateY(var(--rotate-y));
  transform: rotateY(var(--rotate-y));
}

Usage

The .rotate-y class is flagged as a value-driven selector. The variable --rotate-y is required.
<element class="rotate-y" style="--rotate-y: /* value */;" />

Responsive

Prefix .rotate-y utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:rotate-y" style="--md-rotate-y: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="rotate-y:hover" style="--rotate-y-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="rotate-y:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before rotate-y::before" style="--rotate-y-before: /* value */;" />

<element class="content-after rotate-y::after" style="--rotate-y-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="rotate-y=value" />

<!-- Output -->
<element class="rotate-y" style="--rotate-y: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.rotate-y Sets 3D Y-axis rotation via --rotate-y. E.g. 180deg.

rotate-z

Rotates an element around the z-axis via --rotate-z, composing with other transform variables.

CSS Rules

.rotate-z {
  --tw-rotate-z: rotateZ(var(--rotate-z));
  transform: rotateZ(var(--rotate-z));
}

Usage

The .rotate-z class is flagged as a value-driven selector. The variable --rotate-z is required.
<element class="rotate-z" style="--rotate-z: /* value */;" />

Responsive

Prefix .rotate-z utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:rotate-z" style="--md-rotate-z: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="rotate-z:hover" style="--rotate-z-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="rotate-z:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before rotate-z::before" style="--rotate-z-before: /* value */;" />

<element class="content-after rotate-z::after" style="--rotate-z-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="rotate-z=value" />

<!-- Output -->
<element class="rotate-z" style="--rotate-z: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.rotate-z Rotates an element around the z-axis via --rotate-z, composing with other transform variables.

rotate-none

Resets rotation by setting transform to none.

CSS Rules

.rotate-none {
  transform: none;
}

Usage

<element class="rotate-none" />

Responsive

Prefix .rotate-none utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:rotate-none" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="rotate-none:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="rotate-none:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before rotate-none::before" />

<element class="content-after rotate-none::after" />
.rotate-none Resets rotation by setting transform to none.