##Layout mixins SASS
Last active
August 29, 2015 14:13
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////////////////////// | |
// 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