buttons.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. overflow: hidden;
  81. > input[type='file'] {
  82. position: absolute;
  83. top: 0;
  84. right: 0;
  85. min-width: 100%;
  86. min-height: 100%;
  87. font-size: 100px;
  88. text-align: right;
  89. filter: alpha(opacity=0);
  90. opacity: 0;
  91. outline: none;
  92. background: white;
  93. cursor: inherit;
  94. display: block;
  95. }
  96. }
  97. // Application buttons
  98. &.btn-app {
  99. position: relative;
  100. padding: 15px 5px;
  101. margin: 0 0 10px 10px;
  102. min-width: 80px;
  103. height: 60px;
  104. -webkit-box-shadow: none;
  105. -moz-box-shadow: none;
  106. box-shadow: none;
  107. .border-radius(0);
  108. text-align: center;
  109. color: #666;
  110. border: 1px solid #ddd;
  111. background-color: #fafafa;
  112. font-size: 12px;
  113. //Icons within the btn
  114. > .fa, > .glyphicon, > .ion {
  115. font-size: 20px;
  116. display: block;
  117. }
  118. &:hover {
  119. background: #f4f4f4;
  120. color: #444;
  121. border-color: #aaa;
  122. }
  123. &:active, &:focus {
  124. -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  125. -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  126. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  127. }
  128. //The bandge
  129. > .badge {
  130. position: absolute;
  131. top: -3px;
  132. right: -10px;
  133. font-size: 10px;
  134. font-weight: 400;
  135. }
  136. }
  137. //Social buttons
  138. &.btn-social-old {
  139. -webkit-box-shadow: none;
  140. -moz-box-shadow: none;
  141. box-shadow: none;
  142. opacity: 0.9;
  143. //Only font-awesome provides social icons
  144. padding: 0;
  145. > .fa {
  146. padding: 10px 0;
  147. width: 40px;
  148. }
  149. > .fa + span {
  150. border-left: 1px solid rgba(255, 255,255, 0.3);
  151. }
  152. span {
  153. padding: 10px;
  154. }
  155. &:hover {
  156. opacity: 1;
  157. }
  158. }
  159. &.btn-circle {
  160. width: 30px;
  161. height: 30px;
  162. line-height: 30px;
  163. padding: 0;
  164. .border-radius(50%);
  165. }
  166. }