module.exports = { id: 'grid', title: 'Grid system', keywords: [`grid`, `grid system`, `col`, `column`, `layout`, `row`, `container`, `small`, `medium`, `large`, `sm`, `md`, `lg`, `cols`, `predefined`, `offset`, `order`, `reorder`, `first`, `last`, `normal`], description: `

The grid system of mini.css utilizes the Flexbox layout to provide you with a simple, modern, responsive layout system for your web apps. Like most modern CSS frameworks' grid systems, it is composed of three main components - containers, rows and columns:

`, example: `
1
11
2
10
3
9
4
8
5
7
6
6
12
fluid
fluid
`, samples: [`
<div class="container">
  <div class="row">
    <div class="col-sm-1"></div>  <div class="col-sm-11"></div>
  </div>
  <div class="row">
    <div class="col-sm-2"></div>  <div class="col-sm-10"></div>
  </div>
  <div class="row">
    <div class="col-sm-3"></div>  <div class="col-sm-9"></div>
  </div>
  <div class="row">
    <div class="col-sm-4"></div>  <div class="col-sm-8"></div>
  </div>
  <div class="row">
    <div class="col-sm-5"></div>  <div class="col-sm-7"></div>
  </div>
  <div class="row">
    <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
  </div>
  <div class="row">
    <div class="col-sm-12"></div>
  <div class="row">
    <div class="col-sm"></div>  <div class="col-sm"></div>
  </div>
</div>
`, `

You can use the grid system to create a responsive media object in one of many ways. Below is a simple example of a two-column media object with an image and some text:

<div class="row">
  <div class="col-sm-2">
    <img src="image.png" alt="Image description"/>
  </div>
  <div class="col-sm">
    <h2>Media object heading</h2>
    <p>Media object content...</p>
  </div>
</div>
` ], notes: [ `mini.css uses a mobile-first approach in its grid system, so you do not have to rewrite the same layout for all three screen sizes. Leaving a column's size, offset or order unspecified for a screen size will use the style applied for the previous largest screen size recursively. This also applies to predefined layouts.`, `The specific breakpoints for small, medium and large screen sizes are as follows: `, `In many cases, you can omit the container and just use rows and columns. You only need to make sure that all of your rows have the same parent element.`, `You can use fluid columns to create columns whose width is not a multiple of 1/12th of the screen's width (e.g. if you have 7 fluid columns in a row, each one of them will be 1/7th of the screen's width).`, `Predefined layouts can be combined with most of the features of the grid system, such as offsets and reordering, however they do not combine very well with regular columns.`, `You should only apply offset and reordering modifiers to the columns that you need and for the screen sizes that are necessary. Remember to also specify a column width or use a predefined layout before applying these modifiers.` ], customization: [ `Universal padding for elements can be changed globally by changing the value of the --universal-padding variable. This only affects the padding of the container.` ], modifiers: [ { title: `Screen sizes and width`, description: `

Each column class is defined by specifying a screen size (small - sm, medium - md or large - lg) and a column width (a value between 1 and 12 or you can omit it for a fluid column), separated by dashes (e.g. .col-sm-6 for a 6-wide column on a small screen). Using these you can apply different layouts for different screen sizes, by altering the width of columns, using multiple classes. Note that column widths are applied recursively, meaning that if you do not specify a width for a specific screen size the column will use the width applied for the previous largest screen size.

`, example: `
Small screen layout
sm-12
sm-12 md-8
sm-12 md-4
sm-12
Medium/Large screen layout
sm-12
sm-12 md-8
sm-12 md-4
sm-12
`, samples: [`
<div class="container">
  <div class="row">
    <div class="col-sm-12 col-md-3 col-lg-2"></div>
    <div class="col-sm-12 col-md-5 col-lg-7"></div>
    <div class="col-sm-12 col-md-4 col-lg-3"></div>
  </div>
  <div class="row">
    <div class="col-sm col-lg-10"></div>
    <div class="col-sm-4 col-md"></div>
  </div>
</div>
`] }, { title: `Predefined layouts`, description: `

Rows can be modified to apply predefined layouts to the columns inside them, effectively reducing the amount of work required for simple layouts. To create a predefined layout, you can add a class to a row (.cols-*-*), specifying a screen size and width for the columns inside it (or omitting the width for fluid columns), similarly to the way columns are defined (e.g. .row.cols-sm-6 will cause all elements inside the row to be 6-wide on a small screen). Columns inside a predefined layout do not require any further classes to display and, much like normal column layouts, their widths are applied recursively.

`, example: '', samples: [`
<div class="row cols-sm-6">
  <div>
    <p>This paragraph is inside a 6-wide column.</p>
  </div>
  <div>
    <p>This paragraph is inside a 6-wide column.</p>
  </div>
</div>
`] }, { title: `Column offsets`, description: `

Columns can be moved to the right, by applying offset classes (.col-*-offset-*), defining a screen size and an offset (a value between 0 and 11, e.g. .col-sm-offset-3 will move a column 25% to the right on a small screen). Like all other column modifiers, offsets are applied recursively.

`, example: `
11
10
9
8
7
6
5
4
3
2
1
0
`, samples: [`
<div class="row">
  <div class="col-sm-8 col-sm-offset-2 col-md-offset-1 col-lg-offset-0"></div></div>
<div class="row">
  <div class="col-sm col-sm-offset-3 col-md-offset-4 col-lg-offset-0"></div>
</div>
<div class="row">
  <div class="col-sm-4 col-md-offset-5"></div>
</div>
`] }, { title: `Column reordering`, description: `

Columns can be reordered on different screen sizes, by applying a reordering class (.col-*-*), defining a screen size and the order (first, normal or last, e.g. .col-sm-last will move a column to the end of its row on a small screen). Like all other column modifiers, reordering is applied recursively.

`, example: `
Small screen layout
md-last
 
md-first
Medium/Large screen layout
md-first
 
md-last
`, samples: [`
<div class="row">
  <div class="col-sm col-md-last col-lg-normal"></div>
  <div class="col-sm col-sm-first col-md-last"></div>
  <div class="col-sm col-md-first col-lg-normal"></div>
</div>
`] } ], dos: [ { description: `A column can contain a container or a row inside it, or even be a row at the same time. In the latter case, it will act as a column for its parent row and as a row for its children.`, sample: `
<div class="col-sm-3">
  <div class="container"></div>
</div>
<div class="col-sm-3">
  <div class="row"></div>
</div>
<div class="col-sm-3 row">
  <div class="col-sm-6"></div>  <div class="col-sm-6"></div>
</div>
` }, { description: `You can mix fluid columns with fixed, if you like. Fluid columns will adapt to the size of the container left for them. You can also use columns whose total width exceeds 12 (100%). The remaining content will flow below the rest, allowing you to specify multiple blocks of content inside the same row if you need to.`, sample: `
<div class="row">
  <div class="col-sm-12"></div>
  <div class="col-sm"></div>  <div class="col-sm-4"></div>
</div>
` }, { description: `You can change the layout of your content for different displays, laying out your content vertically on smaller screens or horizontally on larger screens. If your columns exceed a total width of 12 (100%) on some displays, they will wrap accordingly.`, sample: `
<div class="row">
  <div class="col-sm-12 col-md-6"></div>
  <div class="col-sm-12 col-md-6"></div>
</div>
` }, { description: `You do not need to specify a column's width or reapply offset and reordering modifiers if they are the same as the previous screen size.`, sample: `
<div class="row">
  <div class="col-sm col-lg-3 col-md-last"></div>
  <div class="col-sm-6 col-md-offset-2"></div>
</div>
` }, { description: `You can add multiple predefined layout classes for different screen sizes, allowing you to build responsive predefined layouts.`, sample: `
<div class="row cols-sm-12 cols-md-6">
  <div></div>  <div></div>
</div>
` }, { description: `To remove a previously applied offset from a column (i.e. one applied from the layout from a smaller screen size) or to make sure no offsets are active on a column, you can set its offset to 0 for a specific screen size. Similarly, to remove previously applied reordering modifiers from a column, you can set its order to normal.`, sample: `
<div class="row">
  <div class="col-sm-8 col-sm-offset-1 col-md-offset-0"></div>
  <div class="col-sm-last col-md-normal"></div>
</div>
` } ], donts: [ { description: `Avoid placing a column directly inside another column. Always use a row to wrap columns, instead.`, sample: `
<div class="col-sm">
  <div class="col-sm"></div>
</div>
` }, { description: `Avoid mixing rows and columns with normal content that is not wrapped on the respective level of the grid layout.`, sample: `
<div class="container">
  <div class="row">
    <div class="col-sm"></div>
    <p>Do not do this.</p>
  </div>
  <p>Do not do this.</p>
</div>
` }, { description: `Never omit the class that specifies a column's width for the small screen size. You can omit all other classes and modifiers, except for this. This also applies to predefined layouts.`, sample: `
<div class="row">
  <div class="col-md"></div>
</div>
<div class="row cols-md"></div>
` }, { description: `Avoid combining normal column width modifiers with predefined layouts, as the predefined layout will most likely override the width modifier of the column.`, sample: `
<div class="row cols-sm-6">
  <div class="row cols-sm-4"></div>
</div>
` } ] }