Skip to content

Instantly share code, notes, and snippets.

@madr
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madr/22009465d864631cdc97 to your computer and use it in GitHub Desktop.
Save madr/22009465d864631cdc97 to your computer and use it in GitHub Desktop.
OOCSS grids, flexbox edition
.line {
overflow: hidden;
}
.unit {
float: left;
box-sizing: border-box;
}
.size1of1 { float: none; }
.size1of2 { width: 50%; }
.size1of3 { width: 33.333333%; }
.size2of3 { width: 66.666666%; }
.size1of4 { width: 25%; }
.size3of4 { width: 75%; }
.size1of5 { width: 20%; }
.size2of5 { width: 40%; }
.size3of5 { width: 60%; }
.size4of5 { width: 80%; }
.line {
display: flex;
flex-direction: row;
align-items: stretch;
}
.size1of1 { flex-grow: 60; }
.size1of2 { flex-grow: 30; }
.size1of3 { flex-grow: 20; }
.size2of3 { flex-grow: 40; }
.size1of4 { flex-grow: 15; }
.size3of4 { flex-grow: 45; }
.size1of5 { flex-grow: 12; }
.size2of5 { flex-grow: 24; }
.size3of5 { flex-grow: 36; }
.size4of5 { flex-grow: 48; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment