mixin.styl 722 B

12345678910111213141516171819202122232425262728293031
  1. // http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
  2. hide-text()
  3. text-indent: 100%
  4. white-space: nowrap
  5. overflow: hidden
  6. // http://codepen.io/shshaw/full/gEiDt
  7. absolute-center(width, height = width)
  8. // margin: auto
  9. // position: absolute
  10. // top: 50%
  11. // top: 0
  12. // left: 0
  13. // bottom: 0
  14. // right: 0
  15. // width: width
  16. // height: height
  17. // overflow: auto
  18. width: width
  19. height: height
  20. position: absolute
  21. top: 50%
  22. left: 50%
  23. margin-top: width * -0.5
  24. margin-left: height * -0.5
  25. avoid-column-break()
  26. vendor("column-break-inside", avoid, only: webkit)
  27. page-break-inside: avoid // for firefox
  28. overflow: hidden // fix for firefox
  29. break-inside: avoid-column