StyleZero Grid System

This is a configuration that enables a 1,2,3,4,6 and 12 grid system to stylezero.


INSTALLATION

To install this grid system just add the following to the stylezero.json .

"attributes":{
  "{n:width|flex-basis}:1/12":"{n}:8.33333333%",
  "{n:width|flex-basis}:{:1/6|2/12}":"{n}:16.66666667%",
  "{n:width|flex-basis}:{:1/4|3/12}":"{n}:25%",
  "{n:width|flex-basis}:{:1/3|2/6|4/12}":"{n}:33.33333333%",
  "{n:width|flex-basis}:5/12":"{n}:41.66666667%",
  "{n:width|flex-basis}:{:1/2|2/4|3/6|6/12}":"{n}:50%",
  "{n:width|flex-basis}:7/12":"{n}:58.33333333%",
  "{n:width|flex-basis}:{:2/3|4/6|8/12}":"{n}:66.66666667%",
  "{n:width|flex-basis}:{:3/4|9/12}":"{n}:75%",
  "{n:width|flex-basis}:{:5/6|10/12}":"{n}:83.33333333%",
  "{n:width|flex-basis}:11/12":"{n}:91.66666667%",
  "{n:width|flex-basis}:{:1/1|2/2|3/3|4/4|6/6|12/12}":"{n}:100%"
}



USAGE

To use the grid system set to the parent element this: 0{display:flex;flex-wrap:wrap}
or on each element this: 0{float:left}.

Then you can define the width of each child like this:

0{width:6/12}

or

0{flex-basis:6/12}
1/1
1/2 2/2
1/3 2/3 3/3
1/4 2/4 3/4 4/4
1/6 2/6 3/6 4/6 5/6 6/6
1/12 2/12 3/12 4/12 5/12 6/12 7/12 8/12 9/12 10/12 11/12 12/12