_clearfix.scss 515 Bytes
Newer Older
1
// Modern micro clearfix provides an easy way to contain floats without adding additional markup.
2 3 4 5 6 7 8 9 10 11 12 13 14 15
//
// Example usage:
//
//    // Contain all floats within .wrapper
//    .wrapper {
//      @include clearfix;
//      .content,
//      .sidebar {
//        float : left;
//      }
//    }

@mixin clearfix {
  &:after {
16 17 18
    content:"";
    display:table;
    clear:both;
19 20 21 22
  }
}

// Acknowledgements
23
// Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)