You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

buttons.less 2.6 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * Component: Button
  3. * -----------------
  4. */
  5. .btn {
  6. /*.border-radius(@btn-border-radius);*/
  7. .box-shadow(@btn-boxshadow);
  8. border: 1px solid transparent;
  9. &.uppercase {
  10. text-transform: uppercase
  11. }
  12. // Flat buttons
  13. &.btn-flat {
  14. .border-radius(0);
  15. -webkit-box-shadow: none;
  16. -moz-box-shadow: none;
  17. box-shadow: none;
  18. border-width: 1px;
  19. }
  20. // Active state
  21. &:active {
  22. -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  23. -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  24. box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  25. }
  26. &:focus {
  27. outline: none;
  28. }
  29. // input file btn
  30. &.btn-file {
  31. position: relative;
  32. overflow: hidden;
  33. > input[type='file'] {
  34. position: absolute;
  35. top: 0;
  36. right: 0;
  37. min-width: 100%;
  38. min-height: 100%;
  39. font-size: 100px;
  40. text-align: right;
  41. .opacity(0);
  42. outline: none;
  43. background: white;
  44. cursor: inherit;
  45. display: block;
  46. }
  47. }
  48. }
  49. //Button color variations
  50. .btn-default {
  51. background-color: #f4f4f4;
  52. color: #444;
  53. border-color: #ddd;
  54. &:hover,
  55. &:active,
  56. &.hover {
  57. background-color: darken(#f4f4f4, 5%);
  58. }
  59. }
  60. .btn-outline {
  61. border: 1px solid #fff;
  62. background: transparent;
  63. color: #fff;
  64. &:hover,
  65. &:focus,
  66. &:active {
  67. color: rgba(255, 255, 255, .7);
  68. border-color: rgba(255, 255, 255, .7);
  69. }
  70. }
  71. .btn-link {
  72. .box-shadow(none);
  73. }
  74. //General .btn with bg class
  75. .btn[class*='bg-']:hover {
  76. .box-shadow(inset 0 0 100px rgba(0, 0, 0, 0.2));
  77. }
  78. // Application buttons
  79. .btn-app {
  80. .border-radius(3px);
  81. position: relative;
  82. padding: 15px 5px;
  83. margin: 0 0 10px 10px;
  84. min-width: 80px;
  85. height: 60px;
  86. text-align: center;
  87. color: #666;
  88. border: 1px solid #ddd;
  89. background-color: #f4f4f4;
  90. font-size: 12px;
  91. //Icons within the btn
  92. > .fa, > .glyphicon, > .ion {
  93. font-size: 20px;
  94. display: block;
  95. }
  96. &:hover {
  97. background: #f4f4f4;
  98. color: #444;
  99. border-color: #aaa;
  100. }
  101. &:active, &:focus {
  102. -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  103. -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  104. box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  105. }
  106. //The badge
  107. > .badge {
  108. position: absolute;
  109. top: -3px;
  110. right: -10px;
  111. font-size: 10px;
  112. font-weight: 400;
  113. }
  114. }