Check the demo website for examples
Bourbon Neat Utils
An extension for Bourbon Neat
Installation
Make sure you have installed bourbon-neat.
$ npm install bourbon-neat-utils --save
Import the package into your Sass file.
;
Usage
See all the examples on the demo website.
.block .block__element
Settings
The breakpoints are already defined in the $grids-default variable, but of course you can overwrite them. Create a Sass file like settings/grid.scss.
Grid breakpoints
You can overwrite these settings.
;;;; // don't forget to set the new breakpoints ;
Multiple grid sets
// Use the basic breakpoints and overwrite params: color, columns, gutter, media and max-width. ; // Now you can use the $grids-default (default set) and your $grids-special-breakpoints set. .block .block__element
Container alignment
options: left, right and center as default
;
Setup hotkeys
Put this piece of code into your javascript file.
; // You can get this value from the environment.const production = false; // You don't want to use this function in your production environment.if !production const options = useCookies: true visualizeGrid: true ;
option | type | default | description |
---|---|---|---|
useCookies | boolean | false | Enable this parameter if you want to keep your toggle before refreshing the page. It will place a cookie 'visualize-grid' and toggles a "visualize-grid" class on your HTML tag. |
visualizeGrid | boolean | false | Visualize the grid for the first time. After that, the cookie (if you enabled the 'useCookies' option) will take over this value. |
Use hotkeys
keys | action |
---|---|
ctrl + l | toggle columns |
Remove hotkeys
; // You can remove the hotkeys. It will delete the cookie if it's set.;