_hide-text.scss 740 B

123456789101112131415161718192021222324252627
  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. @mixin hide-text($height: null) {
  19. overflow: hidden;
  20. text-indent: 101%;
  21. white-space: nowrap;
  22. @if $height {
  23. @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";
  24. }
  25. }