_button.scss 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Button variant mixin
  2. @mixin button-variant($color: $primary-color) {
  3. background: $color;
  4. border-color: darken($color, 3%);
  5. color: $light-color;
  6. &:focus {
  7. @include control-shadow($color);
  8. }
  9. &:focus,
  10. &:hover {
  11. background: darken($color, 2%);
  12. border-color: darken($color, 5%);
  13. color: $light-color;
  14. }
  15. &:active,
  16. &.active {
  17. background: darken($color, 7%);
  18. border-color: darken($color, 10%);
  19. color: $light-color;
  20. }
  21. &.loading {
  22. &::after {
  23. border-bottom-color: $light-color;
  24. border-left-color: $light-color;
  25. }
  26. }
  27. }
  28. @mixin button-outline-variant($color: $primary-color) {
  29. background: $light-color;
  30. border-color: $color;
  31. color: $color;
  32. &:focus {
  33. @include control-shadow($color);
  34. }
  35. &:focus,
  36. &:hover {
  37. background: lighten($color, 50%);
  38. border-color: darken($color, 2%);
  39. color: $color;
  40. }
  41. &:active,
  42. &.active {
  43. background: $color;
  44. border-color: darken($color, 5%);
  45. color: $light-color;
  46. }
  47. &.loading {
  48. &::after {
  49. border-bottom-color: $color;
  50. border-left-color: $color;
  51. }
  52. }
  53. }