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

https://github.com/digitaledgeit/sass-grid

A responsive grid.
https://github.com/digitaledgeit/sass-grid

Last synced: about 1 year ago
JSON representation

A responsive grid.

Awesome Lists containing this project

README

          

# sass-grid

A responsive grid built on flexbox.

Uses `flexbox` and gracefully degrades in older browsers, supporting *most* of the same functionality using an `inline-block` grid.

## Installation

### Browserify

npm install --save sass-grid

### Component

component install sass-grid

**Note**: You are limited to using the compiled version.

## Usage

### Using mixins

CSS:

@import "sass-grid"
@import "sass-named-breakpoints";

.feature-panel {
@include grid();
@include grid--halign-justify-center()
}

.feature-panel__feature {
@include grid__unit();

@include named_breakpoint('md') {
@include grid__unit--cols(3);
}

}

HTML:


...


Does stuff

Does more stuff

Does even more stuff

It just does all the stuff!

...

### Using a compiled grid

CSS:

@import "sass-grid/dist/compiled"

HTML:


...


Does stuff

Does more stuff

Does even more stuff

It just does all the stuff!

...

Find more examples on the [example/example.html](http://digitaledgeit.github.io/sass-grid/example/example.html) page.

## Breakpoints

See [sass-named-breakpoints](https://www.npmjs.com/package/sass-named-breakpoints).

## Building your own grid

1. Requires sass >=3.4
2. Customise the grid settings in `config.scss`
3. Run `npm install`
4. Run `npm run build`

## Notes

### Why 12 columns?
Twelve is easily divisible by lots of numbers e.g. 2, 3, 4, 6

### Why mixins over extends?

https://tech.bellycard.com/blog/sass-mixins-vs-extends-the-data/

### Other responsive utils

Checkout [sass-named-breakpoints](https://www.npmjs.com/package/sass-named-breakpoints) and [sass-spacing](https://www.npmjs.com/package/sass-spacing).

## License

The MIT License (MIT)

Copyright (c) 2014 James Newell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.