A mixin to help clear the element it is mixed into #59

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@axsuul

I find myself having to clear a lot of elements and thought this mixin should make its way into bourbon since it could potentially see a lot of use.

#foo {
  @include cleared;
  float: left;
}

allows one to

<div id="foo">To the left, to the left</div>

I should clear

rather than having to do

<div id="foo">To the left, to the left</div>
<div style="clear: both; visibility: hidden"></div>

I should clear

Additionally, can also

@include cleared(left);
@include cleared(right);
@franks921

I personally don't think that a clearfix hack belongs with the css3 mixins. I also think the micro clearfix is a better clearing method as it prevents collapsing margins in modern browsers.

I added my proposed changes to this pull request.

@frechg

merged in the clearfix: ac172bc

@frechg frechg closed this Feb 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment