Inset

Set the placement of positioned elements.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

Usage

Inset

Control the placement of a positioned element in all directions.

<div class="p-r w-18 h-18 c-white sm:w-32 sm:h-32">
<div class="p-a i-0 b-1"></div>
<div class="d-f p-a i-0 ai-c jc-c p-4 bg-indigo">A</div>
</div>

Inset X

Control the placement of a positioned element in the horizontal direction.

<div class="p-r w-18 h-18 c-white sm:w-32 sm:h-32">
<div class="p-a i-0 b-1"></div>
<div class="d-f p-a t-0 ix-0 ai-c jc-c h-12 p-4 bg-indigo">A</div>
</div>

Inset Y

Control the placement of a positioned element in the vertical direction.

<div class="p-r w-18 h-18 c-white sm:w-32 sm:h-32">
<div class="p-a i-0 b-1"></div>
<div class="d-f p-a iy-0 l-0 ai-c jc-c w-12 p-4 bg-indigo">A</div>
</div>

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:i-*
Small640px
md:i-*
Medium768px
lg:i-*
Large1024px
xxl:i-*
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:i-*

Negative Values

Use negative variants to position in the opposite direction.

Use the -- syntax to apply negative numeric values.

Syntax:i--*