Skip to content

Instantly share code, notes, and snippets.

@jslegers
Last active October 30, 2018 12:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jslegers/6048393 to your computer and use it in GitHub Desktop.
Save jslegers/6048393 to your computer and use it in GitHub Desktop.
Clearfix code without duplication
%display-block-hacked {
display: block;
*zoom: 1;
}
%clear-both {
clear : both;
}
%blank-as-table {
display: table;
content: " ";
}
%clearfix {
&:before{
@extend %blank-as-table;
}
& {
@extend %display-block-hacked;
}
&:after {
@extend %blank-as-table;
@extend %clear-both;
}
}
@sethburtonhall
Copy link

nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment