Sha256: b9328e4d913edc44511a5b1a2f8b14629a48ee6ea379ea38dc674f45ab82b566

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

@import "compass/support";

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($using: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $using == zoom {
      @include has-layout-zoom;
    } @else if $using == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$using}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-0.10.6 frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss
compass-0.10.6.pre.1 frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss