Source on Github

Compass Float

This module provides mixins that help you work around the double-margin bug in IE5/6.

This file can be imported using: @import "compass/utilities/general/float"

Mixins

view source

=float-left
  +float(left)
@mixin float-left {
  @include float(left);
}

Implementation of float:left with fix for the double-margin bug in IE5/6

view source

=float-right
  +float(right)
@mixin float-right {
  @include float(right);
}

Implementation of float:right with fix for the double-margin bug in IE5/6

view source

=float($side: left)
  display: inline
  float: unquote($side)
@mixin float($side: left) {
  display: inline;
  float: unquote($side);
}

Direction independent float mixin that fixes the double-margin bug in IE5/6

view source

=reset-float($display: block)
  float: none
  display: $display
@mixin reset-float($display: block) {
  float: none;
  display: $display;
}

Resets floated elements back to their default of float: none and defaults to display: block unless you pass inline as an argument

Usage Example:

body.homepage
  #footer li
    +float-left
body.signup
  #footer li
    +reset-float