Last active
August 29, 2015 14:02
-
-
Save davestacey/6f9fcd6c8cdb8cabc28e to your computer and use it in GitHub Desktop.
Clearfix 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
@mixin clearfix { | |
&:after, &:before { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
& { | |
*zoom: 1; | |
} | |
} | |
%clearfix { | |
@include clearfix; | |
} | |
.clearfix { | |
@extend %clearfix; | |
} | |
// OLD: | |
// Mixin for Clearfix | |
/* | |
%clearfix { | |
&:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
} | |
*/ | |
// OLD - REMOVE AFTER TESTING | |
/* | |
.clearfix { | |
*zoom: 1; | |
} | |
.clearfix:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment