Skip to content

Instantly share code, notes, and snippets.

@dezinezync
Last active December 15, 2015 22:49
Show Gist options
  • Save dezinezync/5335222 to your computer and use it in GitHub Desktop.
Save dezinezync/5335222 to your computer and use it in GitHub Desktop.
978px Fixed-width Grid
/*Grid*/
.cover() {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
@gutter: 30px;
@col: 54px;
.grid1 {
width: @col;
&.extend {
width: @col + @gutter;
}
}
.grid2 {
width: @col*2 + @gutter;
&.extend {
width: @col*2 + @gutter*2;
}
}
.grid3 {
width: @col*3 + @gutter*2;
&.extend {
width: @col*3 + @gutter*3;
}
}
.grid4 {
width: @col*4 + @gutter*3;
&.extend {
width: @col*4 + @gutter*4;
}
}
.grid5 {
width: @col*5 + @gutter*4;
&.extend {
width: @col*5 + @gutter*5;
}
}
.grid6 {
width: @col*6 + @gutter*5;
&.extend {
width: @col*6 + @gutter*6;
}
}
.grid7 {
width: @col*7 + @gutter*6;
&.extend {
width: @col*7 + @gutter*7;
}
}
.grid8 {
width: @col*8 + @gutter*7;
&.extend {
width: @col*8 + @gutter*8;
}
}
.grid9 {
width: @col*9 + @gutter*8;
&.extend {
width: @col*9 + @gutter*9;
}
}
.grid10 {
width: @col*10 + @gutter*9;
&.extend {
width: @col*10 + @gutter*10;
}
}
.grid11 {
width: @col*11 + @gutter*10;
&.extend {
width: @col*1 + @gutter*11;
}
}
.container,.container6 {
width: @col*12 + @gutter*11;
clear: both;
//overflow: auto;
margin: 0 auto;
}
.container6 {
width: @col*6 + @gutter*5;
}
.grid1,.grid2,.grid3,.grid4,.grid5,.grid6,.grid7,.grid8,.grid9,.grid10,.grid11 {
float: left;
margin-left: @gutter;
&.extend {
margin-left: 0 !important;
}
}
.center {
float: none;
margin: 0 auto;
}
.first {
margin-left: 0;
}
.clear {
clear: both;
}
.hidetext{
text-indent:100%;
white-space:nowrap;
overflow:hidden
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment