button.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. --td-loading-color: #fff;
  31. }
  32. }
  33. &.line-1,
  34. &.line-2 {
  35. box-sizing: border-box;
  36. .button__bg {
  37. width: 100%;
  38. height: 100%;
  39. }
  40. .button__inner,
  41. .button__text {
  42. position: absolute;
  43. top: 0;
  44. left: 0;
  45. width: 100%;
  46. height: 100%;
  47. }
  48. .button__text {
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. padding: 4px 12px;
  53. box-sizing: border-box;
  54. }
  55. }
  56. &.line-1 {
  57. width: 85px;
  58. height: 28px;
  59. font-size: var(--button-line-1, 12px);
  60. }
  61. &.line-2 {
  62. width: 90px;
  63. height: 35px;
  64. font-size: 10px;
  65. }
  66. .button__inner {
  67. padding: 0;
  68. transition: opacity 0.3s ease;
  69. }
  70. }