button.scss 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .button {
  2. position: relative;
  3. text-align: center;
  4. &.disabled {
  5. opacity: 0.5;
  6. pointer-events: none;
  7. }
  8. &.block {
  9. width: 100%;
  10. height: 62px;
  11. .button__bg {
  12. height: 100%;
  13. margin: auto;
  14. }
  15. .button__inner,
  16. .button__text {
  17. // position: absolute;
  18. // top: 10px;
  19. // left: 0;
  20. // width: 100%;
  21. height: 62px - 10px * 2;
  22. position: absolute;
  23. top: 10px;
  24. left: 0;
  25. width: 96%;
  26. background: #1d6ff6;
  27. color: white;
  28. border-radius: 5px;
  29. left: 10px;
  30. }
  31. }
  32. &.line-1,
  33. &.line-2 {
  34. box-sizing: border-box;
  35. .button__bg {
  36. width: 100%;
  37. height: 100%;
  38. }
  39. .button__inner,
  40. .button__text {
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. width: 100%;
  45. height: 100%;
  46. }
  47. .button__text {
  48. display: flex;
  49. justify-content: center;
  50. align-items: center;
  51. padding: 4px 12px;
  52. box-sizing: border-box;
  53. }
  54. }
  55. &.line-1 {
  56. width: 85px;
  57. height: 28px;
  58. font-size: var(--button-line-1, 12px);
  59. }
  60. &.line-2 {
  61. width: 90px;
  62. height: 35px;
  63. font-size: 10px;
  64. }
  65. .button__inner {
  66. padding: 0;
  67. transition: opacity 0.3s ease;
  68. }
  69. }