The Practical Theme

Toggle Light/Dark

A flank pairs two items side by side, where one item (the "flank") sits at its natural size while the other stretches to fill the remaining space. It's the right fit for any "small thing next to a larger thing" pattern: an avatar next to a name and bio, an icon beside a paragraph of text, an input followed by a submit button, or a sidebar alongside page content.

By default the first child is the flank, but you can pick either end with wa-flank:start or wa-flank:end. When the main content gets too narrow, the two items wrap onto separate lines automatically.

Examples

Flanks work especially well for asides, inputs with adjacent buttons, and rich description lists.

Position

By default, the first item in the wa-flank container will flank the other content. You can specify whether the first or last item will flank the remaining content by appending :start or :end to the wa-flank class.

Size

The flank's inline size is determined by the size of its content, but you can set a target size using the --flank-size custom property. When the flank wraps, it stretches to fill the inline size of the container.

The main content fills the remaining inline space of the container. By default, the items wrap when the main content is less than 50% of the container. You can change the minimum size of the main content with the --content-percentage custom property.

Align Items

By default, items are centered in the block direction of the wa-flank container. Add any wa-align-items-* class to change how items line up in the block direction.

Gap

By default, the gap between flank items uses --wa-space-m from your theme. Add any wa-gap-* class to change the spacing between items.