An open API service indexing awesome lists of open source software.

https://github.com/nickrigby/silc-grid

Flexbox-based grid for the silc framework
https://github.com/nickrigby/silc-grid

flexbox grid silc-framework

Last synced: 2 months ago
JSON representation

Flexbox-based grid for the silc framework

Awesome Lists containing this project

README

        

# silc grid [![npm version](https://badge.fury.io/js/silc-grid.svg)](https://badge.fury.io/js/silc-grid)
The grid module is a lightweight, flexbox-based grid system for the [silc framework](https://github.com/nickrigby/silc). The grid uses responsive classes, that can be generated from any number of custom breakpoints.

## HTML
```html


6

6


4

4

4


3

3

3

3


```

## Class modifiers

### Column widths
Column widths can be changed on a per-breakpoint basis using the `silc-grid__col--{columns}-{breakpoint}` modifier class.

```html



...


...


...


...


```

#### Auto column width
A column width can also be set to "auto", where it's width is not explicitly set. Auto widths can be applied across all breakpoints using `silc-grid__col--auto` or at specific breakpoints using `silc-grid__col--auto-{breakpoint}`.

### No gutters
By default, silc grids have gutters, which are specified using the `$silc-grid--gutter` variable. However, using the `silc-grid--no-gutters` modifier class, you can specify individual grids to have no gutters.

```html


...

```

#### Collapse
It is also possible to remove the bottom margin from grid columns using the `silc-grid--collapse` modifier.

```html


...

```

__Note:__ To set all grids to have no gutters by default, simply set the `$silc-grid--gutter` variable to `0`.

### Justify content
Justify the alignment of grid columns using the `silc-grid--justify-{alignment}` modifier class. This can be specified globally (for all breakpoints), or on a per-breakpoint case using `silc-grid--justify-{alignment}-{breakpoint}`.

#### Justify left (default)
```html


...


...

```

#### Justify right
```html


...


...

```

#### Justify center
```html


...


...

```

#### Justify between
Uses flexbox `space-between` to justify content. Great for two column rows where one row is flush left, and the other is flush right.
```html


...


...

```

### Align content
Vertically align columns in the grid using the `silc-grid--align-{alignment}` modifier class. This can be specified globally (for all breakpoints), or on a per-breakpoint case using `silc-grid--align-{alignment}-{breakpoint}`.

#### Align top (default)
```html


...


...

```

#### Align bottom
```html


...


...

```

#### Align center
```html


...


...

```

### Reverse columns
Reverse the order of columns using the `silc-grid--reverse` modifier class. This can be specified globally (for all breakpoints), or on a per-breakpoint case using `silc-grid--reverse-{breakpoint}`.

```html


...


...

```

## Variables
A number of variables are available for modifiying the default structure of the grid. [View full list of variables](src/scss/_variables.scss). Override the default variables by declaring them in your own SASS import file, which should be included after the silc-grid import.