wonderbeyond
10/22/2014 - 8:51 AM

clearfix mixin of less supports IE6/7

clearfix mixin of less supports IE6/7

// Refer:
// - http://nicolasgallagher.com/micro-clearfix-hack/
// - http://nicolasgallagher.com/better-float-containment-in-ie/
// - http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/

.clearfix() {
    &:before,
    &:after {
        content: " "; // 1
        display: table; // 2
    }

    &:after {
        clear: both;
    }

    *zoom: 1;
}