Sha256: 2995301febe8304546e1f8b27b17583014d54b203b8d516293aa1d43f86c6d1a
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
// // Non-semantic helper classes // @mixin h5bp-helpers { .ir { @include image-replacement; } .hidden { @include hidden; } .visuallyhidden { @include visually-hidden; } .clearfix { @include micro-clearfix; } } // For image replacement @mixin image-replacement($img: none, $x: 50%, $y: 50%) { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; @if $img != none { background-image: image-url($img); background-position: $x $y; } br { display: none; } } // Uses image dimensions @mixin sized-image-replacement($img, $x: 50%, $y: 50%) { @include image-replacement($img, $x, $y); width: image-width($img); height: image-height($img); } // Hide from both screenreaders and browsers: h5bp.com/u @mixin hidden { display: none !important; visibility: hidden; } // Hide only visually, but have it available for screenreaders: h5bp.com/v @mixin visually-hidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; &.focusable:active, &.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } } // Hide visually and from screenreaders, but maintain layout @mixin invisible { visibility: hidden; } // Contain floats: h5bp.com/q @mixin micro-clearfix { &:before, &:after { content: ""; display: table; } &:after { clear: both; } *zoom: 1; }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
compass-h5bp-0.0.2 | stylesheets/h5bp/_helpers.scss |
compass-h5bp-0.0.1 | stylesheets/h5bp/_helpers.scss |