buttons.less 2.8 KB

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