sdxc

[ @sdxc/u/layout ]

display

Sets display: inline.

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

Quick reference

Every documented call, beside the CSS it emits.

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

Examples

Basic example

Use inline() to make an element flow with the text around it, wrapping across lines like a word does:

When controlling the flow of text, an element set to
inline() wraps across lines like the words around it
instead of starting a block of its own.
<div mix={[is(96), ...]}>
	When controlling the flow of text, an element set to{" "}
	<div mix={[inline(), ...]}>inline() wraps across lines like the words around it</div>{" "}
	instead of starting a block of its own.
</div>

Applying on a state

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

u.hover(u.inline())

Responsive design

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

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

Signature

u.inline()

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