buttons.less 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. // Buttons styles
  2. // -------------------------
  3. .btn {
  4. background: none;
  5. background-color: @bodyBackground;
  6. .box-shadow(none);
  7. font-weight: bold;
  8. i {
  9. .opacity(60);
  10. position: relative;
  11. bottom: 1px;
  12. }
  13. &:hover, &:active {
  14. background-color: @white;
  15. border-color: lighten(@grayLight, 5%);
  16. i {
  17. .opacity(90);
  18. }
  19. }
  20. &.btn-primary {
  21. background-color: @bluePale;
  22. border-color: darken(@bluePale, 5%);
  23. text-shadow: 0px 1px 0px darken(@bluePale, 15%);
  24. &:hover, &:active {
  25. &:enabled {
  26. background-color: saturate(@bluePale, 20%);
  27. border-color: darken(saturate(@bluePale, 20%), 5%);
  28. }
  29. }
  30. i {
  31. background-image: url("@{iconWhiteSpritePath}");
  32. }
  33. }
  34. &.btn-info {
  35. background-color: desaturate(@bluePale, 25%);
  36. border-color: darken(desaturate(@bluePale, 25%), 5%);
  37. text-shadow: 0px 1px 0px darken(desaturate(@bluePale, 25%), 15%);
  38. &:hover, &:active {
  39. &:enabled {
  40. background-color: desaturate(@bluePale, 10%);
  41. border-color: darken(desaturate(@bluePale, 10%), 5%);
  42. }
  43. }
  44. i {
  45. background-image: url("@{iconWhiteSpritePath}");
  46. }
  47. }
  48. &.btn-success {
  49. background-color: desaturate(@green, 15%);
  50. border-color: darken(desaturate(@green, 15%), 5%);
  51. text-shadow: 0px 1px 0px darken(@green, 15%);
  52. &:hover, &:active {
  53. &:enabled {
  54. background-color: @green;
  55. border-color: darken(@green, 5%);
  56. }
  57. }
  58. i {
  59. background-image: url("@{iconWhiteSpritePath}");
  60. }
  61. }
  62. &.btn-warning {
  63. background-color: desaturate(@orange, 15%);
  64. border-color: darken(desaturate(@orange, 15%), 5%);
  65. text-shadow: 0px 1px 0px darken(@orange, 15%);
  66. &:hover, &:active {
  67. &:enabled {
  68. background-color: @orange;
  69. border-color: darken(@orange, 5%);
  70. }
  71. }
  72. i {
  73. background-image: url("@{iconWhiteSpritePath}");
  74. }
  75. }
  76. &.btn-danger {
  77. background-color: @red;
  78. border-color: darken(@red, 5%);
  79. text-shadow: 0px 1px 0px darken(@red, 15%);
  80. &:hover, &:active {
  81. &:enabled {
  82. background-color: saturate(@red, 20%);
  83. border-color: darken(saturate(@red, 20%), 5%);
  84. }
  85. }
  86. i {
  87. background-image: url("@{iconWhiteSpritePath}");
  88. }
  89. }
  90. &.btn-inverse {
  91. background-color: @textColor;
  92. border-color: darken(@textColor, 5%);
  93. text-shadow: 0px 1px 0px darken(@textColor, 15%);
  94. &:hover, &:active {
  95. &:enabled {
  96. background-color: darken(@textColor, 5%);
  97. border-color: darken(@textColor, 10%);
  98. }
  99. }
  100. i {
  101. background-image: url("@{iconWhiteSpritePath}");
  102. }
  103. }
  104. &.btn-link {
  105. background: none;
  106. border: none;
  107. .opacity(70);
  108. color: @textColor;
  109. &:hover, &:active, &:focus {
  110. &:enabled {
  111. .opacity(90);
  112. text-decoration: none;
  113. }
  114. }
  115. }
  116. &.btn-primary, &.btn-info, &.btn-success, &.btn-warning, &.btn-danger, &.btn-inverse, &.btn-link {
  117. i {
  118. .opacity(100);
  119. }
  120. }
  121. }
  122. a.btn-link {
  123. &:hover, &:active, &:focus {
  124. .opacity(90);
  125. color: @textColor;
  126. text-decoration: none;
  127. }
  128. }