rtl.less 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @radio-prefix-cls: ~'@{ant-prefix}-radio';
  4. @radio-group-prefix-cls: ~'@{radio-prefix-cls}-group';
  5. @radio-prefix-cls-button-wrapper: ~'@{radio-prefix-cls}-button-wrapper';
  6. .@{radio-group-prefix-cls} {
  7. &&-rtl {
  8. direction: rtl;
  9. }
  10. }
  11. // 一般状态
  12. .@{radio-prefix-cls}-wrapper {
  13. &&-rtl {
  14. margin-right: 0;
  15. margin-left: @radio-wrapper-margin-right;
  16. direction: rtl;
  17. }
  18. }
  19. .@{radio-prefix-cls-button-wrapper} {
  20. &&-rtl {
  21. border-right-width: 0;
  22. border-left-width: @border-width-base;
  23. }
  24. &:not(:first-child) {
  25. &::before {
  26. .@{radio-prefix-cls-button-wrapper}.@{radio-prefix-cls-button-wrapper}-rtl& {
  27. right: -1px;
  28. left: 0;
  29. }
  30. }
  31. }
  32. &:first-child {
  33. .@{radio-prefix-cls-button-wrapper}.@{radio-prefix-cls-button-wrapper}-rtl& {
  34. border-right: @border-width-base @border-style-base @border-color-base;
  35. border-radius: 0 @border-radius-base @border-radius-base 0;
  36. }
  37. .@{radio-prefix-cls-button-wrapper}-checked:not([class*=~"' @{radio-prefix-cls}-button-wrapper-disabled'"])& {
  38. border-right-color: @radio-button-hover-color;
  39. }
  40. }
  41. &:last-child {
  42. .@{radio-prefix-cls-button-wrapper}.@{radio-prefix-cls-button-wrapper}-rtl& {
  43. border-radius: @border-radius-base 0 0 @border-radius-base;
  44. }
  45. }
  46. &-disabled {
  47. &:first-child {
  48. .@{radio-prefix-cls-button-wrapper}.@{radio-prefix-cls-button-wrapper}-rtl& {
  49. border-right-color: @border-color-base;
  50. }
  51. }
  52. }
  53. }