Skip to content

Instantly share code, notes, and snippets.

@gotpop
Last active August 29, 2015 14:13
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 gotpop/995dda638ea0d0183fa8 to your computer and use it in GitHub Desktop.
Save gotpop/995dda638ea0d0183fa8 to your computer and use it in GitHub Desktop.
This is a simple layout mixin that I use for laying out simple page blocks.

##Layout mixins SASS

///////////////////////////////////////////////////////////////////////////////////////////////
// Width float mixin
///////////////////////////////////////////////////////////////////////////////////////////////
@mixin float($width) {
width: $width;
float: left;
display: block;
clear: none;
}
///////////////////////////////////////////////////////////////////////////////////////////////
// Width float mixin with calc built in
///////////////////////////////////////////////////////////////////////////////////////////////
@mixin floated( $floatwidth, $gutter ) {
width: calc( #{$floatwidth} - #{$gutter} );
float: left;
display: block;
clear: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment