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.

86 lines
1.7 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. .btn {
  2. display: inline-block;
  3. font-weight: 400;
  4. color: $body-color;
  5. text-align: center;
  6. vertical-align: middle;
  7. user-select: none;
  8. background-color: transparent;
  9. border: 1px solid transparent;
  10. @include button-size( $input-btn-padding-y , $input-btn-padding-x, $input-btn-font-size, $input-btn-line-height, $input-btn-border-radius );
  11. @include transition();
  12. &:hover {
  13. color: $body-color;
  14. text-decoration: none;
  15. }
  16. &:focus,
  17. &.focus {
  18. outline: 0;
  19. box-shadow:none;
  20. }
  21. &.disabled,
  22. &:disabled {
  23. opacity: 0.4;
  24. box-shadow:none;
  25. }
  26. &:not(:disabled):not(.disabled) {
  27. cursor: pointer;
  28. }
  29. &:not(:disabled):not(.disabled):active,
  30. &:not(:disabled):not(.disabled).active {
  31. &:focus {
  32. }
  33. }
  34. }
  35. // Future-proof disabling of clicks on `<a>` elements
  36. a.btn.disabled,
  37. fieldset:disabled a.btn {
  38. pointer-events: none;
  39. }
  40. @each $color, $value in $theme-colors {
  41. .btn-#{$color} {
  42. @include button-variant($value, $value);
  43. }
  44. }
  45. .btn-xs {
  46. @include button-size($input-btn-padding-y-xs, $input-btn-padding-x-xs, $input-btn-font-size-xs, $input-btn-line-height-xs, $input-btn-border-radius-xs);
  47. }
  48. .btn-lg {
  49. @include button-size($input-btn-padding-y-lg, $input-btn-padding-x-lg, $input-btn-font-size-lg, $input-btn-line-height-lg, $input-btn-border-radius-lg);
  50. }
  51. .btn-sm {
  52. @include button-size($input-btn-padding-y-sm, $input-btn-padding-x-sm, $input-btn-font-size-sm, $input-btn-line-height-sm, $input-btn-border-radius-sm);
  53. }
  54. .btn-block {
  55. display: block;
  56. width: 100%;
  57. + .btn-block {
  58. margin-top: 10px;
  59. }
  60. }
  61. // Specificity overrides
  62. input[type="submit"],
  63. input[type="reset"],
  64. input[type="button"] {
  65. &.btn-block {
  66. width: 100%;
  67. }
  68. }
  69. .btn-group {
  70. display:inline-block;
  71. position:relative;
  72. }