_buttons.scss 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Button backgrounds
  2. // ------------------
  3. @mixin buttonBackground($startColor, $endColor, $text-color: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
  4. // gradientBar will set the background to a pleasing blend of these, to support IE<=9
  5. @include gradientBar($startColor, $endColor, $text-color, $textShadow);
  6. // in these cases the gradient won't cover the background, so we override
  7. &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
  8. color: $text-color;
  9. background-image: none;
  10. background-color: $startColor;
  11. }
  12. }
  13. // Button sizes
  14. @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
  15. padding: $padding-y $padding-x;
  16. font-size: $font-size;
  17. //box-shadow: inset 0 (-$padding-y/3) rgba(0,0,0,0.15);
  18. @include border-radius($border-radius);
  19. }
  20. @mixin button-outline-variant($color) {
  21. color: $color;
  22. background-image: none;
  23. background-color: transparent;
  24. border-color: $color;
  25. @include hover {
  26. color: #fff;
  27. background-color: $color;
  28. border-color: $color;
  29. }
  30. &:focus,
  31. &.focus {
  32. color: #fff;
  33. background-color: $color;
  34. border-color: $color;
  35. }
  36. &:active,
  37. &.active,
  38. .open > &.dropdown-toggle {
  39. color: #fff;
  40. background-color: $color;
  41. border-color: $color;
  42. &:hover,
  43. &:focus,
  44. &.focus {
  45. color: #fff;
  46. background-color: darken($color, 17%);
  47. border-color: darken($color, 25%);
  48. }
  49. }
  50. &.disabled,
  51. &:disabled {
  52. &:focus,
  53. &.focus {
  54. border-color: lighten($color, 20%);
  55. }
  56. @include hover {
  57. border-color: lighten($color, 20%);
  58. }
  59. }
  60. }