CSS Grid component. The grid makes use of flex layout.
N.B. This component relies on particular dimensions being applied to cells in the grid via other classes. For example, Atomic utils: dimension. If you need to align the cells, see Atomic utils: alignment.
Read more about Atomic framework.
- Bower:
bower install --save atomic-css-components-grid
- Download: zip, tar.gz
- Git:
git clone https://github.com/atomic-css/components-grid.git
Grid
- core grid componentGrid--row
- flow the cells in row directionGrid--column
- flow the cells in column directionGrid-cell
- child class representing a unit
Layout modifiers for Grid
.
Grid--auto
- make all cells content-sizedGrid--equalMain
- make all cells equal main sizeGrid--equalCross
- make all cells equal cross sizeGrid--2col
- split into 2 columnsGrid--3col
- split into 3 columnsGrid--4col
- split into 4 columns
Modifiers for creating gutter between grid cells.
Grid--gutter<O><Size>
- gutter of<Size>
size in<O>
orientation
Where orientation <O>
can be:
A
- allH
- horizontalV
- vertical
and size <Size>
can be:
- Small (5px)
- Medium (10px)
- Large (20px)
- Flexible layout.
- Intelligent cell wrapping.
- Horizontal and vertical centering of cells.
- Cell width is controlled independently of grid gutter.
- Infinite nesting.
- Built-in redundancy.
A simple grid is easy to create. A grid container can have any number of cells. Each cell can be directly or indirectly styled to control their width and alignment.
<div class="Grid Grid--row">
<div class="Grid-cell u-size1of2">{…}</div>
<div class="Grid-cell u-size1of2">{…}</div>
<div class="Grid-cell u-size1of3">{…}</div>
<div class="Grid-cell u-size1of3">{…}</div>
</div>
- Google Chrome (latest)
- Opera (latest)
- Firefox (latest)
- Safari (latest)
- Internet Explorer 10+