Next.js template
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.

_button.scss 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .c-btn {
  2. @include outline-none;
  3. @include button-clear;
  4. @include flex-center;
  5. font-size: pxToRem(18px);
  6. line-height: 1.35;
  7. padding: pxToRem(8px) pxToRem(8px);
  8. border-radius: $border-radius;
  9. box-shadow: $button-shadow-pressed;
  10. color: inherit;
  11. font-weight: 600;
  12. letter-spacing: 0;
  13. text-align: center;
  14. text-transform: uppercase;
  15. user-select: none;
  16. white-space: nowrap;
  17. min-width: pxToRem(120px);
  18. flex-shrink: 0;
  19. cursor: pointer;
  20. transition: background-color 0.2s, color 0.2s;
  21. &:disabled {
  22. opacity: 0.5;
  23. cursor: auto;
  24. }
  25. &.c-btn--primary {
  26. background-color: $color-primary;
  27. color: $white;
  28. border: 1px solid $color-primary;
  29. &:disabled {
  30. &:hover {
  31. background-color: $color-primary;
  32. box-shadow: none;
  33. }
  34. }
  35. &:hover {
  36. background-color: $color-primary-light;
  37. box-shadow: $button-shadow-hover;
  38. }
  39. &:focus,
  40. &:active {
  41. background-color: $color-primary-dark;
  42. box-shadow: $button-shadow-pressed;
  43. }
  44. }
  45. &.c-btn--primary-outlined {
  46. background-color: transparent;
  47. color: $color-primary;
  48. border: 1px solid $color-primary;
  49. &:disabled {
  50. &:hover {
  51. color: $color-primary;
  52. border: 1px solid $color-primary;
  53. }
  54. }
  55. &:hover {
  56. color: $color-primary;
  57. border: 1px solid $color-primary;
  58. }
  59. &:focus,
  60. &:active {
  61. color: $color-primary;
  62. border: 1px solid $color-primary;
  63. }
  64. }
  65. &.c-btn--blue {
  66. background-color: $blue-3;
  67. color: $white;
  68. background-color: $blue-3;
  69. }
  70. &.c-btn--white {
  71. background-color: $white;
  72. color: $grey-3;
  73. border: 1px solid $grey-4;
  74. box-shadow: $box-shadow;
  75. &:disabled {
  76. &:hover {
  77. background-color: $white;
  78. color: $grey-3;
  79. }
  80. }
  81. &:hover {
  82. color: $grey-5;
  83. }
  84. &:focus,
  85. &:active {
  86. background-color: $grey;
  87. }
  88. }
  89. &.c-btn--primary-clear {
  90. background-color: transparent;
  91. color: $color-primary;
  92. border: none;
  93. box-shadow: none;
  94. padding: 0;
  95. }
  96. &.c-btn--auto {
  97. min-width: auto;
  98. }
  99. &.c-btn--sm {
  100. font-size: pxToRem(16px);
  101. line-height: 1.5;
  102. padding: pxToRem(4px) pxToRem(15px);
  103. }
  104. &.c-btn--capitalize {
  105. text-transform: capitalize;
  106. }
  107. &.c-btn--bank-acount-card {
  108. padding: 0 pxToRem(16px);
  109. min-height: pxToRem(32px);
  110. min-width: pxToRem(120px);
  111. font-size: pxToRem(16px);
  112. line-height: 1.5;
  113. }
  114. &.c-btn--hidden {
  115. visibility: hidden;
  116. height: 0;
  117. }
  118. @include media-below($bp-md) {
  119. padding: pxToRemMd(4px) pxToRemMd(25px);
  120. font-size: pxToRemMd(16px);
  121. line-height: 1.5;
  122. min-width: pxToRemMd(80px);
  123. &.c-btn--auth {
  124. padding: pxToRemMd(12px) pxToRemMd(25px);
  125. line-height: 1.35;
  126. font-size: pxToRemMd(18px);
  127. }
  128. &.c-btn--sm {
  129. padding: pxToRemMd(4px) pxToRemMd(15px);
  130. }
  131. &.c-btn--bank-acount-card {
  132. flex-grow: 1;
  133. min-height: pxToRemMd(40px);
  134. padding: pxToRemMd(8px) pxToRemMd(16px);
  135. font-size: pxToRemMd(18px);
  136. line-height: 1.33;
  137. }
  138. &.c-btn--lg {
  139. padding: pxToRemMd(7.5px) pxToRemMd(15px);
  140. font-size: pxToRemMd(18px);
  141. line-height: 1.5;
  142. }
  143. }
  144. @include media-below($bp-xs) {
  145. white-space: unset;
  146. }
  147. }