rtl.less 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .@{badge-prefix-cls} {
  2. &-rtl {
  3. direction: rtl;
  4. }
  5. &:not(&-not-a-wrapper) &-count,
  6. &:not(&-not-a-wrapper) &-dot,
  7. &:not(&-not-a-wrapper) .@{number-prefix-cls}-custom-component {
  8. .@{badge-prefix-cls}-rtl & {
  9. right: auto;
  10. left: 0;
  11. direction: ltr;
  12. transform: translate(-50%, -50%);
  13. transform-origin: 0% 0%;
  14. }
  15. }
  16. &-rtl&:not(&-not-a-wrapper) .@{number-prefix-cls}-custom-component {
  17. right: auto;
  18. left: 0;
  19. transform: translate(-50%, -50%);
  20. transform-origin: 0% 0%;
  21. }
  22. &-status {
  23. &-text {
  24. .@{badge-prefix-cls}-rtl & {
  25. margin-right: 8px;
  26. margin-left: 0;
  27. }
  28. }
  29. }
  30. }
  31. .@{ribbon-prefix-cls}-rtl {
  32. direction: rtl;
  33. &.@{ribbon-prefix-cls}-placement-end {
  34. right: unset;
  35. left: -8px;
  36. border-bottom-right-radius: @border-radius-sm;
  37. border-bottom-left-radius: 0;
  38. .@{ribbon-prefix-cls}-corner {
  39. right: unset;
  40. left: 0;
  41. border-color: currentcolor currentcolor transparent transparent;
  42. &::after {
  43. border-color: currentcolor currentcolor transparent transparent;
  44. }
  45. }
  46. }
  47. &.@{ribbon-prefix-cls}-placement-start {
  48. right: -8px;
  49. left: unset;
  50. border-bottom-right-radius: 0;
  51. border-bottom-left-radius: @border-radius-sm;
  52. .@{ribbon-prefix-cls}-corner {
  53. right: 0;
  54. left: unset;
  55. border-color: currentcolor transparent transparent currentcolor;
  56. &::after {
  57. border-color: currentcolor transparent transparent currentcolor;
  58. }
  59. }
  60. }
  61. }