Last active
August 29, 2015 14:10
-
-
Save craigmdennis/c093774d67e3ad6341d2 to your computer and use it in GitHub Desktop.
Toolkit: Common @Mixins and helpers commonly used in projects
This file contains hidden or 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
%clearfix { | |
&:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
} |
This file contains hidden or 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
// =================================================== | |
// Positional Mixins | |
// =================================================== | |
@mixin fixed($top:0, $right:0, $bottom:0, $left:0) { | |
position: fixed; | |
top: $top; | |
right: $right; | |
bottom: $bottom; | |
left: $left; | |
} |
This file contains hidden or 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
// =================================================== | |
// Utilities | |
// =================================================== | |
@function rem($size) { | |
$font-base: 16px !default; | |
@if ($old-ie == true) { | |
@return $size *1px; | |
} | |
@else { | |
@return ($size / $font-base) * 1rem; | |
} | |
} | |
// For IE fallback, create an ie specific stylesheet | |
// and include the following: | |
// | |
// $old-ie: true; | |
// @import "styles"; | |
// | |
// Where 'styles' is your main scss stylesheet name | |
// Include both stylesheets using conditional comments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment