Skip to content

Instantly share code, notes, and snippets.

@electriccode
Last active October 11, 2015 02:08
Show Gist options
  • Save electriccode/3786201 to your computer and use it in GitHub Desktop.
Save electriccode/3786201 to your computer and use it in GitHub Desktop.
Grid system base file
/* Custom Fluid Grid System */
.reverse_cgrid:before,
.reverse_cgrid:after,
.cgrid:before,
.cgrid:after {
content: '.';
display: block;
overflow: hidden;
visibility: hidden;
font-size: 0;
line-height: 0;
width: 0;
height: 0;
}
/* Auto clearfix */
.cgrid:after,
.reverse_cgrid:after {
clear:both;
}
/* Clearfix for IE */
.reverse_cgrid, .cgrid {
zoom: 1;
}
/* Auto float left */
.cgrid > *, .reverse_cgrid > * {
display: inline;
float: left;
margin-left: 5px;
margin-right: 5px;
}
.cgrid.compact > *, .reverse_cgrid.compact > * {
margin-left:0;
margin-right:0;
}
/* Auto float in case of reverse cgrid */
.reverse_cgrid > * {
float:right;
}
.alpha, .first-item {
margin-left: 0;
}
.omega, .last-item {
margin-right: 0;
}
.cgrid > .no_margins, .reverse_cgrid > .no_margins {
margin-left: 0;
margin-right: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment