sdxc

[ @sdxc/u/layout ]

display

Sets display: inline-flex.

import { inlineFlex } from "@sdxc/u/layout";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.inlineFlex()css({ display: "inline-flex" })

Examples

Basic example

Use inlineFlex() to lay out an element's children as a flex row while the element itself flows inline with the text:

Ask Ada Lovelace to review the change before it ships.
<div mix={[is(96), ...]}>
	Ask{" "}
	<span
		mix={[
			inlineFlex(),
			items("center"),
			gap(1.5),
			pi(2),
			rounded("full"),
			bg("brand.tint"),
			fg("brand.emphasis"),
		]}
	>
		<span mix={[is(2), bs(2), rounded("full"), bg("success.solid")]} />
		Ada Lovelace
	</span>{" "}
	to review the change before it ships.
</div>

Applying on a state

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

u.hover(u.inlineFlex())

Responsive design

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

u.at("md", u.inlineFlex())

Signature

u.inlineFlex()

Written by Sergio Xalambrí. Follow @sergiodxa for new packages, or sponsor the work.