SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

display

Sets display: inline-grid.

tsx
import { inlineGrid } from "@sdxc/u/layout";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.inlineGrid()css({ display: "inline-grid" })

Examples

Basic example

Use inlineGrid() to lay out an element's children on a grid while the element itself flows inline with the text:

Reviewed by and two others before it was merged.
tsx
<div mix={[is(96), ...]}>
	Reviewed by{" "}
	<span mix={[inlineGrid(), gridTemplate({ columns: repeat(3, "1.25rem") }), gap(1)]}>
		<span mix={[is(5), bs(5), rounded("full"), bg("brand.solid")]} />
		<span mix={[is(5), bs(5), rounded("full"), bg("success.solid")]} />
		<span mix={[is(5), bs(5), rounded("full"), bg("warning.solid")]} />
	</span>{" "}
	and two others before it was merged.
</div>

Applying on a state

Wrap the call in a state utility to scope it to one selector.

typescript
u.hover(u.inlineGrid())

Responsive design

Wrap the call in a container query to scope it to one width.

typescript
u.at("md", u.inlineGrid())

Signature

typescript
u.inlineGrid()
@sdxc/u

Can’t find it? Contact us