Class Reference

Layout

Class Reference

Layout

Display, flexbox, grid, alignment and responsive visibility.

How to use

Start with flex or grid. Add direction, columns, alignment and gap classes to express the layout. Avoid competing classes that set the same property at the same breakpoint.

Responsive behavior

Tablet and mobile suffixes apply inside their media queries. The unsuffixed class supplies the base layout; narrower breakpoint rules override it at its named breakpoint.

Visual reference

Examples use the installed class styles and your design variables. Each preview includes the context needed to show the class behavior; responsive examples follow the browser width. Guide: tinted area = layout container; blue tiles = items; dashed lines = container and grid-track boundaries.

.blockdisplay: block

The surrounding elements show whether the example occupies its own line.

.inline-blockdisplay: inline-block

The surrounding elements show whether the example occupies its own line.

.flexdisplay: flex

The surrounding elements show whether the example occupies its own line.

.inline-flexdisplay: inline-flex

The surrounding elements show whether the example occupies its own line.

.griddisplay: grid · grid-template-rows: none

The surrounding elements show whether the example occupies its own line.

.inline-griddisplay: inline-grid

The surrounding elements show whether the example occupies its own line.

.hiddendisplay: none

Item 2 is hidden; items 1 and 3 remain visible.

.flex-rowflex-direction: row

The numbered items show the flow direction.

.flex-columnflex-direction: column

The numbered items show the flow direction.

.flex-row-reverseflex-direction: row-reverse

The numbered items show the flow direction.

.flex-column-reverseflex-direction: column-reverse

The numbered items show the flow direction.

.flex-wrapflex-wrap: wrap

The same six items use equal starting widths. Wrap creates more lines; nowrap keeps one line and allows shrinking.

.flex-nowrapflex-wrap: nowrap

The same six items use equal starting widths. Wrap creates more lines; nowrap keeps one line and allows shrinking.

.flex-wrap-reverseflex-wrap: wrap-reverse

The same six items use equal starting widths. Wrap creates more lines; nowrap keeps one line and allows shrinking.

.growflex-grow: 1

All three items start at one quarter of the available width. Only item 2 carries the class.

.grow-0flex-grow: 0

All three items start at one quarter of the available width. Only item 2 carries the class.

.shrinkflex-shrink: 1

All three items start at 50% of the container width, creating a need to shrink. Only item 2 carries the class.

.shrink-0flex-shrink: 0

All three items start at 50% of the container width, creating a need to shrink. Only item 2 carries the class.

.basis-autoflex-basis: auto

Only item 2 carries the class. The other items start at one quarter of the available width; wrapping reveals the target’s basis.

.basis-fullflex-basis: 100%

Only item 2 carries the class. The other items start at one quarter of the available width; wrapping reveals the target’s basis.

.basis-halfflex-basis: 50%

Only item 2 carries the class. The other items start at one quarter of the available width; wrapping reveals the target’s basis.

.basis-thirdflex-basis: 33.3333%

Only item 2 carries the class. The other items start at one quarter of the available width; wrapping reveals the target’s basis.

.basis-two-thirdsflex-basis: 66.6667%

Only item 2 carries the class. The other items start at one quarter of the available width; wrapping reveals the target’s basis.

.justify-startjustify-content: flex-start

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.justify-centerjustify-content: center

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.justify-endjustify-content: flex-end

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.justify-betweenjustify-content: space-between

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.justify-aroundjustify-content: space-around

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.justify-evenlyjustify-content: space-evenly

Items start at 20% of the container width, leaving free space to show horizontal distribution.

.align-startalign-items: flex-start

The container is 180px tall. Different item heights make cross-axis alignment visible.

.align-centeralign-items: center

The container is 180px tall. Different item heights make cross-axis alignment visible.

.align-endalign-items: flex-end

The container is 180px tall. Different item heights make cross-axis alignment visible.

.align-stretchalign-items: stretch

The container is 180px tall. Items stretch to the available height.

.align-baselinealign-items: baseline

Different text sizes share the same text baseline; dashed guides mark the baseline.

.align-content-startalign-content: flex-start

Wrapping items inside a taller container make line distribution visible.

.align-content-centeralign-content: center

Wrapping items inside a taller container make line distribution visible.

.align-content-endalign-content: flex-end

Wrapping items inside a taller container make line distribution visible.

.align-content-betweenalign-content: space-between

Wrapping items inside a taller container make line distribution visible.

.align-content-aroundalign-content: space-around

Wrapping items inside a taller container make line distribution visible.

.align-content-evenlyalign-content: space-evenly

Wrapping items inside a taller container make line distribution visible.

.align-content-stretchalign-content: stretch

Wrapping items inside a taller container make line distribution visible.

.self-autoalign-self: auto

Only item 2 carries this class. Items 1 and 3 keep their reference alignment.

.self-startalign-self: flex-start

Only item 2 carries this class. Items 1 and 3 keep their reference alignment.

.self-centeralign-self: center

Only item 2 carries this class. Items 1 and 3 keep their reference alignment.

.self-endalign-self: flex-end

Only item 2 carries this class. Items 1 and 3 keep their reference alignment.

.self-stretchalign-self: stretch

Only item 2 carries this class. Items 1 and 3 keep their reference alignment.

.self-baselinealign-self: baseline

Only item 2 carries this class. Item 1 supplies the reference text baseline.

.justify-items-startjustify-items: start

Each tile sits inside an equal grid track; smaller tiles reveal start, center and end alignment.

.justify-items-centerjustify-items: center

Each tile sits inside an equal grid track; smaller tiles reveal start, center and end alignment.

.justify-items-endjustify-items: end

Each tile sits inside an equal grid track; smaller tiles reveal start, center and end alignment.

.justify-items-stretchjustify-items: stretch

Each tile sits inside an equal grid track; smaller tiles reveal start, center and end alignment.

.grid-align-startalign-items: start

Different item heights make vertical alignment within grid tracks visible.

.grid-align-endalign-items: end

Different item heights make vertical alignment within grid tracks visible.

.grid-columns-1grid-template-columns: minmax(0, 1fr)

Equal grid tracks fill the available width. Numbered tiles show the column count.

.grid-columns-2grid-template-columns: repeat(2, minmax(0, 1fr))

Equal grid tracks fill the available width. Numbered tiles show the column count.

.grid-columns-3grid-template-columns: repeat(3, minmax(0, 1fr))

Equal grid tracks fill the available width. Numbered tiles show the column count.

.grid-columns-4grid-template-columns: repeat(4, minmax(0, 1fr))

Equal grid tracks fill the available width. Numbered tiles show the column count.

.grid-columns-5grid-template-columns: repeat(5, minmax(0, 1fr))

Equal grid tracks fill the available width. Numbered tiles show the column count.

.grid-columns-6grid-template-columns: repeat(6, minmax(0, 1fr))

Equal grid tracks fill the available width. Numbered tiles show the column count.

.visible-tabletdisplay: none

Item 2 is hidden above 1024px and visible at 1024px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.visible-mobiledisplay: none

Item 2 is hidden above 767px and visible at 767px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.image-fill-heightheight: 0px · min-height: 100%

The frame is at least 240px tall. The image fills that height on desktop; at 1024px or below, it uses its natural aspect ratio. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.column-span-1grid-column: span 1

Four equal grid tracks. Only item 2 carries the span class; tile borders show its occupied area.

.column-span-2grid-column: span 2

Four equal grid tracks. Only item 2 carries the span class; tile borders show its occupied area.

.column-span-3grid-column: span 3

Four equal grid tracks. Only item 2 carries the span class; tile borders show its occupied area.

.column-span-4grid-column: span 4

Four equal grid tracks. Only item 2 carries the span class; tile borders show its occupied area.

.column-span-fullgrid-column: 1 / -1

Four equal grid tracks. Only item 2 carries the span class; tile borders show its occupied area.

.order-firstorder: -999

Only item 2 carries the class; the numbers show its position after ordering.

.order-noneorder: 0

Only item 2 carries the class; the numbers show its position after ordering.

.order-lastorder: 999

Only item 2 carries the class; the numbers show its position after ordering.

.grid-columns-1-tabletgrid-template-columns: minmax(0, 1fr)

This reference grid changes from three columns to one at 1024px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.grid-columns-2-tabletgrid-template-columns: repeat(2, minmax(0, 1fr))

This reference grid changes from three columns to two at 1024px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.order-first-tabletorder: -999

Item 2 moves first at 1024px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.hidden-tabletdisplay: none

Item 2 is visible above 1024px and hidden at 1024px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.flex-column-mobileflex-direction: column

The same three items switch from a row to a column at 767px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.hidden-mobiledisplay: none

Item 2 is visible above 767px and hidden at 767px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).

.grid-columns-1-mobilegrid-template-columns: minmax(0, 1fr)

This reference grid changes from three columns to one at 767px or below. Current viewport: desktop (>1024px).Current viewport: tablet (768–1024px).Current viewport: mobile (≤767px).