core.less 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* FONT AWESOME CORE
  2. * -------------------------- */
  3. .@{fa-css-prefix} {
  4. display: inline-block;
  5. font-family: FontAwesome;
  6. font-style: normal;
  7. font-weight: normal;
  8. line-height: 1;
  9. -webkit-font-smoothing: antialiased;
  10. -moz-osx-font-smoothing: grayscale;
  11. }
  12. /* makes the font 33% larger relative to the icon container */
  13. .@{fa-css-prefix}-lg {
  14. font-size: (4em / 3);
  15. line-height: (3em / 4);
  16. vertical-align: -15%;
  17. }
  18. /* increased font size for icon-lg */
  19. .@{fa-css-prefix}-fixed-width {
  20. width: (16em / 14);
  21. padding-right: (4em / 14);
  22. text-align: right;
  23. &.@{fa-css-prefix}-lg {
  24. width: (20em / 14);
  25. }
  26. }
  27. // Icon UL & LI
  28. // -------------------------
  29. .@{fa-css-prefix}-ul {
  30. padding-left: 0;
  31. margin-left: @fa-icon-li-width;
  32. list-style-type: none;
  33. > li { position: relative; }
  34. }
  35. .@{fa-css-prefix}-li {
  36. position: absolute;
  37. left: -@fa-icon-li-width;
  38. width: @fa-icon-li-width;
  39. top: (2em / 14);
  40. text-align: center;
  41. &.@{fa-css-prefix}-lg {
  42. left: -@fa-icon-li-width + (4em / 14);
  43. }
  44. }
  45. // allows usage of the hide class directly on font awesome icons
  46. .@{fa-css-prefix}.hide { display: none; }
  47. .@{fa-css-prefix}-muted { color: @fa-icon-muted; }
  48. .@{fa-css-prefix}-light { color: @fa-icon-light; }
  49. .@{fa-css-prefix}-dark { color: @fa-icon-dark; }
  50. // Icon Borders
  51. // -------------------------
  52. .@{fa-css-prefix}-border {
  53. padding: .2em .25em .15em;
  54. border: solid 1px @fa-border-color;
  55. border-radius: 3px;
  56. }
  57. // Icon Sizes
  58. // -------------------------
  59. .@{fa-css-prefix}-2x {
  60. font-size: 2em;
  61. &.@{fa-css-prefix}-border {
  62. border-width: 2px;
  63. border-radius: 4px;
  64. }
  65. }
  66. .@{fa-css-prefix}-3x {
  67. font-size: 3em;
  68. &.@{fa-css-prefix}-border {
  69. border-width: 3px;
  70. border-radius: 5px;
  71. }
  72. }
  73. .@{fa-css-prefix}-4x {
  74. font-size: 4em;
  75. &.@{fa-css-prefix}-border {
  76. border-width: 4px;
  77. border-radius: 6px;
  78. }
  79. }
  80. .@{fa-css-prefix}-5x {
  81. font-size: 5em;
  82. &.@{fa-css-prefix}-border {
  83. border-width: 5px;
  84. border-radius: 7px;
  85. }
  86. }
  87. // Floats & Margins
  88. // -------------------------
  89. // Quick floats
  90. .pull-right { float: right; }
  91. .pull-left { float: left; }
  92. .@{fa-css-prefix} {
  93. &.pull-left { margin-right: .3em; }
  94. &.pull-right { margin-left: .3em; }
  95. }