Skip to content

Instantly share code, notes, and snippets.

@mike-henderson
Last active August 8, 2021 10:57
Show Gist options
  • Save mike-henderson/4948107 to your computer and use it in GitHub Desktop.
Save mike-henderson/4948107 to your computer and use it in GitHub Desktop.
@mixin clearfix-micro() {
& {
*zoom: 1;
}
&:before,
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
}
//Usage:
.whatever {
@include clearfix-micro();
}
@FlashJunior
Copy link

If you need it for IE9+ you can use:

@mixin clearfix {
  &::after {
    clear: both;
    content: "";
    display: table;
  }
}

source: bourbon

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