Sha256: d6ef4edc275557234da1d9949306f006b9c60fb7e9db9d6a3beec81ac4c77836

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

//
// Non-semantic helper classes
//

@import "compass/utilities/text/replacement";
@import "compass/utilities/general/clearfix";

@mixin html5-boilerplate-helpers {
  .ir { @include image-replacement; }

  .hidden { @include hidden; }

  .visuallyhidden { @include visually-hidden; }

  .clearfix { @include pie-clearfix; }
}

// Almost the same as compass replace-text
// but adding direction: ltr
@mixin image-replacement($img: none, $x: 50%, $y: 50%) {
  @include hide-text;
  direction: ltr;
  background-repeat: no-repeat;
  @if $img != none {
    background-image: image-url($img);
    background-position: $x $y;
  }
}

@mixin sized-image-replacement($img, $x: 50%, $y: 50%) {
  @include image-replacement($img, $x, $y);
  width: image-width($img);
  height: image-height($img);
}

// Hide for both screenreaders and browsers
// css-discuss.incutio.com/wiki/Screenreader_Visibility
@mixin hidden {
  display:none;
  visibility: hidden;
}

// Hide only visually, but have it available for screenreaders
// www.webaim.org/techniques/css/invisiblecontent/
// Solution from: j.mp/visuallyhidden - Thanks Jonathan Neal!
@mixin visually-hidden {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px);  // IE6, IE7
  clip: rect(1px, 1px, 1px, 1px);
}

// Hide visually and from screenreaders, but maintain layout
@mixin invisible { visibility: hidden; }

// The Magnificent CLEARFIX
// Now using pie-clearfix from Compass
// since it's exactly the same

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
html5-boilerplate-0.1.7 stylesheets/html5-boilerplate/_helpers.scss
html5-boilerplate-0.1.6 stylesheets/html5-boilerplate/_helpers.scss