rtl.less 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @import '../../input/style/mixin';
  4. @input-number-prefix-cls: ~'@{ant-prefix}-input-number';
  5. .@{input-number-prefix-cls} {
  6. &-rtl {
  7. direction: rtl;
  8. }
  9. &-handler {
  10. .@{input-number-prefix-cls}-rtl & {
  11. border-right: @border-width-base @border-style-base @input-number-handler-border-color;
  12. border-left: 0;
  13. }
  14. &-wrap {
  15. .@{input-number-prefix-cls}-rtl & {
  16. right: auto;
  17. left: 0;
  18. }
  19. .@{input-number-prefix-cls}-rtl.@{input-number-prefix-cls}-borderless & {
  20. border-right-width: 0;
  21. }
  22. }
  23. &-up {
  24. .@{input-number-prefix-cls}-rtl & {
  25. border-top-right-radius: 0;
  26. }
  27. }
  28. &-down {
  29. .@{input-number-prefix-cls}-rtl & {
  30. border-bottom-right-radius: 0;
  31. }
  32. }
  33. }
  34. &-input {
  35. .@{input-number-prefix-cls}-rtl & {
  36. direction: ltr;
  37. text-align: right;
  38. }
  39. }
  40. }
  41. // https://github.com/ant-design/ant-design/issues/35870
  42. .input-group(@input-number-prefix-cls) {
  43. > .@{input-number-prefix-cls}-rtl:first-child {
  44. border-radius: 0 @border-radius-base @border-radius-base 0;
  45. }
  46. > .@{input-number-prefix-cls}-rtl:last-child {
  47. border-radius: @border-radius-base 0 0 @border-radius-base;
  48. }
  49. &-addon {
  50. .@{input-number-prefix-cls}-group-rtl &:first-child {
  51. border-right: @border-width-base @border-style-base @input-border-color;
  52. border-left: 0;
  53. border-radius: 0 @border-radius-base @border-radius-base 0;
  54. }
  55. .@{input-number-prefix-cls}-group-rtl &:last-child {
  56. border-right: 0;
  57. border-left: @border-width-base @border-style-base @input-border-color;
  58. border-radius: @border-radius-base 0 0 @border-radius-base;
  59. }
  60. }
  61. }