Skip to content

Instantly share code, notes, and snippets.

@paulhhowells
Last active August 22, 2016 16:25
Show Gist options
  • Save paulhhowells/a15afe207ac28397c16c95a8e2b371e0 to your computer and use it in GitHub Desktop.
Save paulhhowells/a15afe207ac28397c16c95a8e2b371e0 to your computer and use it in GitHub Desktop.
// A better (Drupal friendly) float fix that does not hide overflow.
// Read more at: http://nicolasgallagher.com/micro-clearfix-hack/
@mixin float-fix () {
// IE 6 & 7
*zoom: 1;
&:before,
&:after {
// Space content avoids an Opera bug when contenteditable attribute is used elsewhere in the document.
content: " ";
// Use of `table` instead of `block` is necessary when using `:before` to contain the top margins of child elements.
display: table;
// Firefox 2.
visibility: hidden;
}
&:after {
clear: both;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment