Last active
December 30, 2015 18:09
-
-
Save ryanburgess/7865478 to your computer and use it in GitHub Desktop.
Add clearfix to your CSS or a specific element using the Clearfix SASS mixin.
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
// ----------------------------------------- | |
// Clearfix after element | |
// ------------------------------------------- | |
// usage: @include clearfix(); | |
@mixin clearfix() { | |
& { | |
*zoom: 1; | |
} | |
&:before, | |
&:after { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment