_mixins.less 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Mixins
  2. // --------------------------
  3. .fa-icon() {
  4. -moz-osx-font-smoothing: grayscale;
  5. -webkit-font-smoothing: antialiased;
  6. display: inline-block;
  7. font-style: normal;
  8. font-variant: normal;
  9. font-weight: normal;
  10. line-height: 1;
  11. vertical-align: -.125em;
  12. }
  13. .fa-icon-rotate(@degrees, @rotation) {
  14. -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})";
  15. transform: rotate(@degrees);
  16. }
  17. .fa-icon-flip(@horiz, @vert, @rotation) {
  18. -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)";
  19. transform: scale(@horiz, @vert);
  20. }
  21. // Only display content to screen readers. A la Bootstrap 4.
  22. //
  23. // See: http://a11yproject.com/posts/how-to-hide-content/
  24. .sr-only() {
  25. border: 0;
  26. clip: rect(0,0,0,0);
  27. height: 1px;
  28. margin: -1px;
  29. overflow: hidden;
  30. padding: 0;
  31. position: absolute;
  32. width: 1px;
  33. }
  34. // Use in conjunction with .sr-only to only display content when it's focused.
  35. //
  36. // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
  37. //
  38. // Credit: HTML5 Boilerplate
  39. .sr-only-focusable() {
  40. &:active,
  41. &:focus {
  42. clip: auto;
  43. height: auto;
  44. margin: 0;
  45. overflow: visible;
  46. position: static;
  47. width: auto;
  48. }
  49. }