Created
January 11, 2014 09:47
-
-
Save DeanPoulin/8368930 to your computer and use it in GitHub Desktop.
Clearfix
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
| <!-- Usage as a class --> | |
| <div class="clearfix">...</div> | |
| <style type="text/css"> | |
| /* Mixin itself */ | |
| .clearfix() { | |
| &:before, | |
| &:after { | |
| content: " "; | |
| display: table; | |
| } | |
| &:after { | |
| clear: both; | |
| } | |
| } | |
| /* Usage as a Mixin */ | |
| .element { | |
| .clearfix(); | |
| } | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment