3.0.0 is a full rewrite of gr8 internals. The resulting css is still the same (with a few additions), but how you go about generating it has been refined. Documentation has been fully rewritten.
Some larger updates:
Just a function
gr8 is now just a function which returns a string of css:
var gr8 = require('gr8')
var css = gr8({/* options */})
The functionality for generating a css utility is pulled out into it's own module called gr8-util. This is just a little function where given some options, returns a string of css. gr8 is now just a collection of calls to gr8-util.
Custom utilities as options
Add custom utilities by passing objects into the utils option. These objects are passed directly into gr8-util.
Nested columns are removed and replaced with split classes. These classes are meant to split a container. For example, .s2 splits a container in half, aka width:50%. By combining column and split classes almost any level of column nesting can be achieved.
3.0.0
is a full rewrite ofgr8
internals. The resulting css is still the same (with a few additions), but how you go about generating it has been refined. Documentation has been fully rewritten.Some larger updates:
Just a function
gr8
is now just a function which returns a string of css:gr8-util
The functionality for generating a css utility is pulled out into it's own module called
gr8-util
. This is just a little function where given some options, returns a string of css.gr8
is now just a collection of calls togr8-util
.Custom utilities as options
Add custom utilities by passing objects into the
utils
option. These objects are passed directly into gr8-util.Split (
.s
) classesNested columns are removed and replaced with split classes. These classes are meant to split a container. For example,
.s2
splits a container in half, akawidth:50%
. By combining column and split classes almost any level of column nesting can be achieved.Avoids generating obscene amounts of nested column and column offset classes.
Selectors as functions
Define selectors as functions for more flexibility:
Custom media queries
Breakpoints will now accept media query strings as values:
Breaking Changes
gr8
is now just a function callattach
, opt for insert-css or similar instead.toString
method.add
method. Add custom utilities by passing objects into theutils
option.min-width
based by defaultresponsive
option, passbreakpoints: false
to remove responsive utilities.s
classes.selector
options to define selector as a function.attribute
option and replaced withbreakpointSelector
option. Can define selector as function.max
option, pass media query string directly into breakpoints for custom media queries.✌️✨