field-sizing

Class Description

field-sizing-fixed

Sets field-sizing to fixed, giving form fields a fixed size unaffected by their content.

CSS Rules

.field-sizing-fixed {
  field-sizing: fixed;
}

Usage

<element class="field-sizing-fixed" />

Responsive

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

<element class="md:field-sizing-fixed" />

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="field-sizing-fixed: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="field-sizing-fixed: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 field-sizing-fixed::before" />

<element class="content-after field-sizing-fixed::after" />
.field-sizing-fixed Sets field-sizing to fixed, giving form fields a fixed size unaffected by their content.

field-sizing-content

Sets field-sizing to content, letting form fields grow or shrink to fit their content.

CSS Rules

.field-sizing-content {
  field-sizing: content;
}

Usage

<element class="field-sizing-content" />

Responsive

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

<element class="md:field-sizing-content" />

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="field-sizing-content: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="field-sizing-content: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 field-sizing-content::before" />

<element class="content-after field-sizing-content::after" />
.field-sizing-content Sets field-sizing to content, letting form fields grow or shrink to fit their content.