[ @sdxc/u/layout ]
display
Sets display: block.
import { block } from "@sdxc/u/layout";Quick reference
Every documented call, beside the CSS it emits.
| Call | CSS |
|---|---|
u.block() | css({ display: "block" }) |
Examples
Basic example
Use block() to make an element a block box that starts on its own line and fills the width of its parent:
When an inline span becomes a block,block()it breaks out of the line of text it sat in and stretches across the paragraph.
<p mix={[maxIs(96), ...]}>
When an inline span becomes a block,
<span mix={[block(), ...]}>block()</span>
it breaks out of the line of text it sat in and stretches across the paragraph.
</p>Applying on a state
Wrap the call in a state utility to scope it to one selector.
u.hover(u.block())Responsive design
Wrap the call in a container query to scope it to one width.
u.at("md", u.block())Signature
u.block()