Skip to content

Instantly share code, notes, and snippets.

@Tenderfeel
Created April 9, 2015 06:02
Show Gist options
  • Save Tenderfeel/e9f52f2267e1365f8e3e to your computer and use it in GitHub Desktop.
Save Tenderfeel/e9f52f2267e1365f8e3e to your computer and use it in GitHub Desktop.
_grid.styl
/*
grid
flexと併用できる。<br>
親の横幅が基準になるので、marginやpaddingを指定しているとはみ出す。ag-flex_1の方がいい場合もあります。
http://getbootstrap.com/css/#grid
```
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 8 | 4 |
| 4 | 4 | 4 |
| 6 | 6 |
```
Markup:
<div class="flex">
<div class="grid_2"></div>
<div class="grid_2"></div>
</div>
*/
.grid_1
width 8.33333333% !important
.grid_2
width 16.66666667% !important
.grid_3
width 25% !important
.grid_4
width 33.33333333% !important
.grid_5
width 41.66666667% !important
.grid_6
width 50% !important
.grid_7
width 58.33333333% !important
.grid_8
width 66.66666667% !important
.grid_9
width 75% !important
.grid_10
width 83.33333333% !important
.grid_11
width 91.66666667% !important
.grid_12
width 100% !important
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment