p0c-website

Proof of concepts for fun and profit
git clone https://git.in0rdr.ch/p0c-website.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

_hide-text.scss (740B)


      1 /// Hides the text in an element, commonly used to show an image. Some elements will need block-level styles applied.
      2 ///
      3 /// @link http://zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement
      4 ///
      5 /// @example scss - Usage
      6 ///   .element {
      7 ///     @include hide-text;
      8 ///   }
      9 ///
     10 /// @example css - CSS Output
     11 ///   .element {
     12 ///     overflow: hidden;
     13 ///     text-indent: 101%;
     14 ///     white-space: nowrap;
     15 ///   }
     16 ///
     17 /// @todo Remove height argument in v5.0.0
     18 
     19 @mixin hide-text($height: null) {
     20   overflow: hidden;
     21   text-indent: 101%;
     22   white-space: nowrap;
     23 
     24   @if $height {
     25     @warn "The `hide-text` mixin has changed and no longer requires a height. The height argument will no longer be accepted in v5.0.0";
     26   }
     27 }