Particles CSSParticles CSSv0.0.10GitHub

Grid

Control CSS grid layout.

Variables

VariableDefault
$maxColumnsSets the max number of grid columns and rows. Default: 12
$gapsList of options for grid-gaps. Default: .25rem, .5rem, 1rem, 1.5rem, 2rem, 3rem, 4rem

Classes

ClassProperties
.griddisplay: grid;
.inline-griddisplay: inline-grid;
.columns-autogrid-template-columns: repeat(auto-fit, minmax(0, 1fr))
.columns-{1-12}grid-template-columns: {1-12};
.rows-{1-12}grid-template-rows: {1-12};
.gap-0grid-gap: 0;
.column-gap-0grid-column-gap: 0;
.row-gap-0grid-row-gap: 0;
.gap-{1-8}grid-gap: {$gaps[1-8]};
.column-gap-{1-8}grid-column-gap: {$gaps[1-8]};
.row-gap-{1-8}grid-row-gap: {$gaps[1-8]};
.column-span-fullgrid-column: 1/-1;
.column-span-{1-12}grid-column: span {1-12};
.row-span-fullgrid-row: 1/-1;
.row-span-{1-12}grid-row: span {1-12};
.flow-columngrid-auto-flow: column;
.flow-rowgrid-auto-flow: row;

.grid

Sets the display property to grid.

.flow-{row|column}

Sets the grid-auto-flow property.

.grid.flow-column
.grid.flow-row

Columns

.columns-auto

Creates a grid container with columns that automatically size.

.grid.columns-auto

.grid.columns-{1-12}

Creates a grid container with 1-12 columns.

.grid.columns-2
1
2
3
4

Rows

.grid.rows-auto

Creates a grid container with auto rows.

.grid.flow-column.rows-auto
1
2
3
4

.grid.rows-{1-12}

Creates a grid container with 1-12 rows.

.grid.flow-column.rows-2
1
2
3
4

Gaps

.grid.gap-0

Sets the grid-gap property to 0. You can also use grid-column-gap or grid-row-gap to set their respecitve properties.

.grid.gap-{1-8}

Sets the grid-gap property to the corresponding value in $gaps. You can also use grid-column-gap or grid-row-gap to set their respecitve properties.

1
2
3
4

Spans

.column-span-full

Sets the grid-column property to 1/-1 so it spans the full width of the grid.

.column-span-{1-12}

Sets the grid-column property to span {1-12}.

.row-span-full

Sets the grid-row property to 1/-1 so it spans the full width of the grid.

.row-span-{1-12}

Sets the grid-row property to span {1-12}.

1
2
3
4