mixins.less 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Mixins
  2. // --------------------------
  3. .icon(@icon) {
  4. .icon-FontAwesome();
  5. content: @icon;
  6. }
  7. .icon-FontAwesome() {
  8. // position: relative;
  9. // top: 0;
  10. display: inline-block;
  11. font-family: FontAwesome;
  12. font-style: normal;
  13. font-weight: normal;
  14. line-height: 1;
  15. -webkit-font-smoothing: antialiased;
  16. -moz-osx-font-smoothing: grayscale;
  17. // from bootstrap, throws off rendering
  18. // &:empty { width: 1em; }
  19. // text-decoration: inherit;
  20. // text-rendering: auto;
  21. }
  22. .border-radius(@radius) {
  23. -webkit-border-radius: @radius;
  24. -moz-border-radius: @radius;
  25. border-radius: @radius;
  26. }
  27. .rotate(@degrees, @rotation) {
  28. filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
  29. -webkit-transform: rotate(@degrees);
  30. -moz-transform: rotate(@degrees);
  31. -ms-transform: rotate(@degrees);
  32. -o-transform: rotate(@degrees);
  33. transform: rotate(@degrees);
  34. }
  35. .flip(@horiz, @vert) {
  36. -webkit-transform: scale(@horiz, @vert);
  37. -moz-transform: scale(@horiz, @vert);
  38. -ms-transform: scale(@horiz, @vert);
  39. -o-transform: scale(@horiz, @vert);
  40. transform: scale(@horiz, @vert);
  41. }
  42. .icon-stack(@width: 2em, @height: 2em, @top-font-size: 1em, @base-font-size: 2em) {
  43. .fa-icon-stack {
  44. position: relative;
  45. display: inline-block;
  46. width: @width;
  47. height: @height;
  48. line-height: @width;
  49. vertical-align: -35%;
  50. .fa-icon {
  51. position: absolute;
  52. display: block;
  53. width: 100%;
  54. height: 100%;
  55. font-size: @top-font-size;
  56. line-height: inherit;
  57. *line-height: @height;
  58. text-align: center;
  59. }
  60. .fa-icon-stack-base {
  61. font-size: @base-font-size;
  62. *line-height: (@height / @base-font-size);
  63. }
  64. }
  65. }