Skip to content

Instantly share code, notes, and snippets.

@denisjacquemin
Created August 3, 2012 08:19
Show Gist options
  • Save denisjacquemin/3245758 to your computer and use it in GitHub Desktop.
Save denisjacquemin/3245758 to your computer and use it in GitHub Desktop.
Sass mixin clearfix
// source http://www.alistapart.com/articles/getting-started-with-sass/
// http://nicolasgallagher.com/micro-clearfix-hack/
@mixin clearfix {
// For modern browsers
&:before,
&:after {
content:" ";
display:table;
}
&:after {
clear:both;
}
// For IE 6/7 (trigger hasLayout)
& {
*zoom:1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment