buttons.less 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*
  2. Component: Buttons
  3. -------------------------
  4. */
  5. .btn {
  6. font-weight: 500;
  7. .border-radius(@btn-border-radius);
  8. border: 1px solid transparent;
  9. -webkit-box-shadow: inset 0px -2px 0px 0px rgba(0,0,0,0.09);
  10. -moz-box-shadow: inset 0px -2px 0px 0px rgba(0,0,0,0.09);
  11. box-shadow: inset 0px -1px 0px 0px rgba(0,0,0,0.09);
  12. //Button color variations
  13. &.btn-default {
  14. background-color: #fafafa;
  15. color: #666;
  16. border-color: #ddd;
  17. border-bottom-color: #ddd;
  18. &:hover, &:active, &.hover {
  19. background-color: #f4f4f4!important;
  20. }
  21. &.btn-flat {
  22. border-bottom-color: darken(#e6e7e8, 5%);
  23. }
  24. }
  25. &.btn-primary {
  26. background-color: @light-blue;
  27. border-color: darken(@light-blue, 5%);
  28. &:hover, &:active, &.hover {
  29. background-color: darken(@light-blue, 5%);
  30. }
  31. }
  32. &.btn-success {
  33. background-color: @green;
  34. border-color: darken(@green, 5%);
  35. &:hover, &:active, &.hover {
  36. background-color: darken(@green, 5%);
  37. }
  38. }
  39. &.btn-info {
  40. background-color: @aqua;
  41. border-color: darken(@aqua, 5%);
  42. &:hover, &:active, &.hover {
  43. background-color: darken(@aqua, 5%);
  44. }
  45. }
  46. &.btn-danger {
  47. background-color: @red;
  48. border-color: darken(@red, 5%);
  49. &:hover, &:active, &.hover {
  50. background-color: darken(@red, 5%);
  51. }
  52. }
  53. &.btn-warning {
  54. background-color: @yellow;
  55. border-color: darken(@yellow, 5%);
  56. &:hover, &:active, &.hover {
  57. background-color: darken(@yellow, 5%);
  58. }
  59. }
  60. // Flat buttons
  61. &.btn-flat {
  62. .border-radius(0);
  63. -webkit-box-shadow: none;
  64. -moz-box-shadow: none;
  65. box-shadow: none;
  66. border-width: 1px;
  67. }
  68. // Active state
  69. &:active {
  70. -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  71. -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  72. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  73. }
  74. &:focus {
  75. outline: none;
  76. }
  77. // input file btn
  78. &.btn-file {
  79. position: relative;
  80. width: 120px;
  81. height: 35px;
  82. overflow: hidden;
  83. > input[type='file'] {
  84. display: block !important;
  85. width: 100% !important;
  86. height: 35px !important;
  87. opacity: 0 !important;
  88. position: absolute;
  89. top: -10px;
  90. cursor: pointer;
  91. }
  92. }
  93. // Application buttons
  94. &.btn-app {
  95. position: relative;
  96. padding: 15px 5px;
  97. margin: 0 0 10px 10px;
  98. min-width: 80px;
  99. height: 60px;
  100. -webkit-box-shadow: none;
  101. -moz-box-shadow: none;
  102. box-shadow: none;
  103. .border-radius(0);
  104. text-align: center;
  105. color: #666;
  106. border: 1px solid #ddd;
  107. background-color: #fafafa;
  108. font-size: 12px;
  109. //Icons within the btn
  110. > .fa, > .glyphicon, > .ion {
  111. font-size: 20px;
  112. display: block;
  113. }
  114. &:hover {
  115. background: #f4f4f4;
  116. color: #444;
  117. border-color: #aaa;
  118. }
  119. &:active, &:focus {
  120. -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  121. -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  122. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  123. }
  124. //The bandge
  125. > .badge {
  126. position: absolute;
  127. top: -3px;
  128. right: -10px;
  129. font-size: 10px;
  130. font-weight: 400;
  131. }
  132. }
  133. //Social buttons
  134. &.btn-social-old {
  135. -webkit-box-shadow: none;
  136. -moz-box-shadow: none;
  137. box-shadow: none;
  138. opacity: 0.9;
  139. //Only font-awesome provides social icons
  140. padding: 0;
  141. > .fa {
  142. padding: 10px 0;
  143. width: 40px;
  144. }
  145. > .fa + span {
  146. border-left: 1px solid rgba(255, 255,255, 0.3);
  147. }
  148. span {
  149. padding: 10px;
  150. }
  151. &:hover {
  152. opacity: 1;
  153. }
  154. }
  155. &.btn-circle {
  156. width: 30px;
  157. height: 30px;
  158. line-height: 30px;
  159. padding: 0;
  160. .border-radius(50%);
  161. }
  162. }