mixins.less 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Mixins
  2. // --------------------------
  3. .icon(@icon) {
  4. .icon-FontAwesome();
  5. content: @icon;
  6. }
  7. .icon-FontAwesome() {
  8. *margin-right: .3em; // fixes ie7 issues
  9. font-family: FontAwesome;
  10. -webkit-font-smoothing: antialiased;
  11. font-style: normal;
  12. font-weight: normal;
  13. text-decoration: inherit;
  14. -moz-osx-font-smoothing: grayscale;
  15. }
  16. .border-radius(@radius) {
  17. -webkit-border-radius: @radius;
  18. -moz-border-radius: @radius;
  19. border-radius: @radius;
  20. }
  21. .icon-stack(@width: 2em, @height: 2em, @top-font-size: 1em, @base-font-size: 2em) {
  22. .icon-stack {
  23. position: relative;
  24. display: inline-block;
  25. width: @width;
  26. height: @height;
  27. line-height: @width;
  28. vertical-align: -35%;
  29. [class^="icon-"],
  30. [class*=" icon-"] {
  31. position: absolute;
  32. display: block;
  33. width: 100%;
  34. height: 100%;
  35. font-size: @top-font-size;
  36. line-height: inherit;
  37. *line-height: @height;
  38. text-align: center;
  39. }
  40. .icon-stack-base {
  41. font-size: @base-font-size;
  42. *line-height: (@height / @base-font-size);
  43. }
  44. }
  45. }