scale

Class Description

scale

Sets uniform scale (X & Y) via --scale. E.g. 1.1 to grow, 0.9 to shrink.

CSS Rules

.scale {
  --tw-scale-x: var(--scale);
  --tw-scale-y: var(--scale);
  --tw-scale-z: var(--scale);
  scale: var(--scale);
}

Usage

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

Responsive

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

<element class="md:scale" style="--md-scale: /* 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="scale:hover" style="--scale-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="scale: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 scale::before" style="--scale-before: /* value */;" />

<element class="content-after scale::after" style="--scale-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="scale=value" />

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

CLS Alert

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

.scale Sets uniform scale (X & Y) via --scale. E.g. 1.1 to grow, 0.9 to shrink.

scale-x

Sets horizontal scale via --scale-x.

CSS Rules

.scale-x {
  --tw-scale-x: var(--scale-x);
  scale: var(--scale-x);
}

Usage

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

Responsive

Prefix .scale-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:scale-x" style="--md-scale-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="scale-x:hover" style="--scale-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="scale-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 scale-x::before" style="--scale-x-before: /* value */;" />

<element class="content-after scale-x::after" style="--scale-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="scale-x=value" />

<!-- Output -->
<element class="scale-x" style="--scale-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.

.scale-x Sets horizontal scale via --scale-x.

scale-y

Sets vertical scale via --scale-y.

CSS Rules

.scale-y {
  --tw-scale-y: var(--scale-y);
  scale: var(--scale-y);
}

Usage

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

Responsive

Prefix .scale-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:scale-y" style="--md-scale-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="scale-y:hover" style="--scale-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="scale-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 scale-y::before" style="--scale-y-before: /* value */;" />

<element class="content-after scale-y::after" style="--scale-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="scale-y=value" />

<!-- Output -->
<element class="scale-y" style="--scale-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.

.scale-y Sets vertical scale via --scale-y.

scale-z

Scales an element along the z-axis via --scale-z, composing with x/y scale variables.

CSS Rules

.scale-z {
  --tw-scale-z: var(--scale-z);
  scale: var(--scale-z);
}

Usage

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

Responsive

Prefix .scale-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:scale-z" style="--md-scale-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="scale-z:hover" style="--scale-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="scale-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 scale-z::before" style="--scale-z-before: /* value */;" />

<element class="content-after scale-z::after" style="--scale-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="scale-z=value" />

<!-- Output -->
<element class="scale-z" style="--scale-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.

.scale-z Scales an element along the z-axis via --scale-z, composing with x/y scale variables.

scale-none

Resets scaling by setting transform to none.

CSS Rules

.scale-none {
  transform: none;
}

Usage

<element class="scale-none" />

Responsive

Prefix .scale-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:scale-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="scale-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="scale-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 scale-none::before" />

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

scale-3d

Applies x/y/z scale variables together as a 3D scale value.

CSS Rules

.scale-3d {
  scale: var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z);
}

Usage

<element class="scale-3d" />

Responsive

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

<element class="md:scale-3d" />

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="scale-3d: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="scale-3d: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 scale-3d::before" />

<element class="content-after scale-3d::after" />
.scale-3d Applies x/y/z scale variables together as a 3D scale value.