inputNumber.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. @import '../input/variables.scss';
  2. @import './variables.scss';
  3. $module: #{$prefix}-input-number;
  4. .#{$module} {
  5. display: inline-flex;
  6. align-items: center;
  7. box-sizing: border-box;
  8. &-suffix-btns {
  9. display: inline-flex;
  10. flex-direction: column;
  11. margin-left: $spacing-inputNumber_button-marginLeft;
  12. border: $width-inputNumber_button-border solid $color-inputNumber_button-border-default;
  13. border-radius: $radius-inputNumber;
  14. background-color: $color-inputNumber_button-bg-default;
  15. box-sizing: border-box;
  16. & > .#{$module}-button {
  17. height: 50%;
  18. width: $width-inputNumber_button;
  19. padding: 0;
  20. margin: 0;
  21. display: inline-flex;
  22. align-items: center;
  23. justify-content: center;
  24. user-select: none;
  25. border-radius: 0;
  26. color: $color-inputNumber_button-text-default;
  27. }
  28. & > .#{$module}-button-up:not(.#{$module}-button-up-not-allowed),
  29. & > .#{$module}-button-down:not(.#{$module}-button-down-not-allowed) {
  30. &:hover {
  31. cursor: pointer;
  32. background-color: $color-inputNumber_button-bg-hover;
  33. }
  34. &:active {
  35. cursor: pointer;
  36. background-color: $color-inputNumber_button-bg-active;
  37. }
  38. }
  39. & > .#{$module}-button-up.#{$module}-button-up-disabled,
  40. & > .#{$module}-button-down.#{$module}-button-down-disabled {
  41. background-color: $color-inputNumber_button-bg-disabled;
  42. color: $color-inputNumber_button-text-disabled;
  43. }
  44. & > .#{$module}-button-up.#{$module}-button-up-not-allowed,
  45. & > .#{$module}-button-down.#{$module}-button-down-not-allowed {
  46. cursor: not-allowed;
  47. }
  48. &-inner-hover {
  49. border-color: $color-inputNumber_button-border-hover;
  50. }
  51. }
  52. &-suffix-btns-inner {
  53. margin-left: $spacing-inputNumber_button_inner-marginLeft;
  54. }
  55. .#{$prefix}-input-clearbtn {
  56. & + .#{$prefix}-input-suffix {
  57. margin-left: $spacing-inputNumber_clearbtn_suffix-marginLeft;
  58. .#{$module}-suffix-btns-inner {
  59. margin-left: 0;
  60. }
  61. }
  62. }
  63. &-size {
  64. &-default {
  65. .#{$module}-suffix-btns {
  66. height: $height-inputNumber_button_default;
  67. }
  68. .#{$module}-suffix-btns-inner {
  69. height: $height-inputNumber_button_inner_default;
  70. }
  71. }
  72. &-large {
  73. .#{$module}-suffix-btns {
  74. height: $height-inputNumber_button_large;
  75. }
  76. .#{$module}-suffix-btns-inner {
  77. height: $height-inputNumber_button_inner_large;
  78. }
  79. }
  80. &-small {
  81. .#{$module}-suffix-btns {
  82. height: $height-inputNumber_button_small;
  83. }
  84. .#{$module}-suffix-btns-inner {
  85. height: $height-inputNumber_button_inner_small;
  86. }
  87. }
  88. }
  89. }
  90. @import "./rtl.scss";