Skip to content

Instantly share code, notes, and snippets.

@mapsam
Created July 16, 2015 00:38
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 mapsam/f14aac68d5ad3e5d6b54 to your computer and use it in GitHub Desktop.
Save mapsam/f14aac68d5ad3e5d6b54 to your computer and use it in GitHub Desktop.
Blocks
// block sections, to be used within .containers
// all exist on a 12 unit grid and are relative in
// size to the container element
$break: 50em;
@mixin width($num) {
width: 100% * ($num / 12)
}
.block_1,
.block_2,
.block_3,
.block_4,
.block_5,
.block_6,
.block_7,
.block_8,
.block_9,
.block_10,
.block_11,
.block_12 {
display: block;
@media (min-width: $break) {
float: left;
}
&.block_right {
float: right;
}
}
@media (min-width: $break) {
.block_1 { @include width(1); }
.block_2 { @include width(2); }
.block_3 { @include width(3); }
.block_4 { @include width(4); }
.block_5 { @include width(5); }
.block_6 { @include width(6); }
.block_7 { @include width(7); }
.block_8 { @include width(8); }
.block_9 { @include width(9); }
.block_10 { @include width(10); }
.block_11 { @include width(11); }
.block_12 { @include width(12); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment