transform-style

Class Description

transform-3d

Sets transform-style: preserve-3d. Children are rendered in 3D space.

CSS Rules

.transform-3d {
  transform-style: preserve-3d;
}

Usage

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

Responsive

Prefix .transform-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:transform-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="transform-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="transform-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 transform-3d::before" />

<element class="content-after transform-3d::after" />
.transform-3d Sets transform-style: preserve-3d. Children are rendered in 3D space.

transform-flat

Sets transform-style: flat. Children are flattened into the element's plane.

CSS Rules

.transform-flat {
  transform-style: flat;
}

Usage

<element class="transform-flat" />

Responsive

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

<element class="md:transform-flat" />

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="transform-flat: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="transform-flat: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 transform-flat::before" />

<element class="content-after transform-flat::after" />
.transform-flat Sets transform-style: flat. Children are flattened into the element's plane.