Skip to content

Instantly share code, notes, and snippets.

@trevor-atlas
Created November 26, 2013 17:38
Show Gist options
  • Save trevor-atlas/7662625 to your computer and use it in GitHub Desktop.
Save trevor-atlas/7662625 to your computer and use it in GitHub Desktop.
Clearfix hack using pseudo elements
@mixin clearfix() {
&:before,
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
}
USEAGE:
.article {
@include clearfix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment