affix.less 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @import '../../input/style/mixin';
  2. @import (reference) '../../style/themes/index';
  3. @input-prefix-cls: ~'@{ant-prefix}-input';
  4. @input-affix-margin: 4px;
  5. .@{ant-prefix}-input-number {
  6. &-affix-wrapper {
  7. .input();
  8. // or number handler will cover form status
  9. position: relative;
  10. display: inline-flex;
  11. width: 90px;
  12. padding: 0;
  13. padding-inline-start: @input-padding-horizontal-base;
  14. &:not(&-disabled):hover {
  15. .hover();
  16. z-index: 1;
  17. }
  18. &-focused,
  19. &:focus {
  20. z-index: 1;
  21. }
  22. &-disabled {
  23. .@{ant-prefix}-input-number[disabled] {
  24. background: transparent;
  25. }
  26. }
  27. > div.@{ant-prefix}-input-number {
  28. width: 100%;
  29. border: none;
  30. outline: none;
  31. &.@{ant-prefix}-input-number-focused {
  32. box-shadow: none !important;
  33. }
  34. }
  35. input.@{ant-prefix}-input-number-input {
  36. padding: 0;
  37. }
  38. &::before {
  39. display: inline-block;
  40. width: 0;
  41. visibility: hidden;
  42. content: '\a0';
  43. }
  44. .@{ant-prefix}-input-number-handler-wrap {
  45. z-index: 2;
  46. }
  47. }
  48. &-prefix,
  49. &-suffix {
  50. display: flex;
  51. flex: none;
  52. align-items: center;
  53. pointer-events: none;
  54. }
  55. &-prefix {
  56. margin-inline-end: @input-affix-margin;
  57. }
  58. &-suffix {
  59. position: absolute;
  60. top: 0;
  61. right: 0;
  62. z-index: 1;
  63. height: 100%;
  64. margin-right: @input-padding-horizontal-base;
  65. margin-left: @input-affix-margin;
  66. }
  67. }
  68. .@{ant-prefix}-input-number-group-wrapper .@{ant-prefix}-input-number-affix-wrapper {
  69. width: 100%;
  70. }