Last active
August 8, 2021 10:57
-
-
Save mike-henderson/4948107 to your computer and use it in GitHub Desktop.
SASS micro clearfix mixin
http://nicolasgallagher.com/micro-clearfix-hack/#comment-29398
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-micro() { | |
& { | |
*zoom: 1; | |
} | |
&:before, | |
&:after { | |
content: ""; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
} | |
//Usage: | |
.whatever { | |
@include clearfix-micro(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you need it for IE9+ you can use:
source: bourbon