index.less 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. @import (reference) './variable.less';
  2. @import '../style/mixins/hairline.less';
  3. @popoverPrefix: ant-popover;
  4. .@{popoverPrefix} {
  5. position: relative;
  6. &-children {
  7. z-index: 999;
  8. }
  9. &-mask {
  10. z-index: 998;
  11. background: none;
  12. }
  13. &-content {
  14. position: absolute;
  15. min-width: 64 * @rpx;
  16. max-width: calc(100vw - 48 * @rpx);
  17. z-index: 999;
  18. }
  19. &-inner {
  20. position: relative;
  21. border-radius: 16 * @rpx;
  22. overflow: hidden;
  23. font-size: 30 * @rpx;
  24. background-color: @COLOR_BACKGROUND_POPOVER;
  25. color: @COLOR_WHITE_DEFAULT;
  26. padding: 16 * @rpx 24 * @rpx;
  27. width: max-content;
  28. }
  29. &-arrow {
  30. position: absolute;
  31. width: 0;
  32. height: 0;
  33. border-left: 18 * @rpx solid transparent;
  34. border-right: 18 * @rpx solid transparent;
  35. border-bottom: 18 * @rpx solid @COLOR_BACKGROUND_POPOVER;
  36. }
  37. &-top {
  38. transform: translate(-50%, -100%);
  39. &-arrow {
  40. bottom: 2 * @rpx;
  41. transform: translate(-50%, 100%) rotate(180deg);
  42. left: 50%;
  43. }
  44. }
  45. &-bottom {
  46. transform: translate(-50%, 100%);
  47. &-arrow {
  48. top: 2 * @rpx;
  49. transform: translate(-50%, -100%) rotate(0deg);
  50. left: 50%;
  51. }
  52. }
  53. &-left {
  54. transform: translate(-100%, -50%);
  55. &-arrow {
  56. right: 2 * @rpx;
  57. transform: translate(75%, -50%) rotate(90deg);
  58. top: 50%;
  59. }
  60. }
  61. &-right {
  62. transform: translate(100%, -50%);
  63. &-arrow {
  64. left: 2 * @rpx;
  65. transform: translate(-75%, -50%) rotate(-90deg);
  66. top: 50%;
  67. }
  68. }
  69. &-top-left {
  70. transform: translate(0, -100%);
  71. &-arrow {
  72. bottom: 2 * @rpx;
  73. transform: translate(0, 100%) rotate(180deg);
  74. left: 24 * @rpx;
  75. }
  76. }
  77. &-top-right {
  78. transform: translate(0, -100%);
  79. &-arrow {
  80. bottom: 2 * @rpx;
  81. transform: translate(0, 100%) rotate(180deg);
  82. right: 24 * @rpx;
  83. }
  84. }
  85. &-bottom-left {
  86. transform: translate(0, 100%);
  87. &-arrow {
  88. top: 2 * @rpx;
  89. transform: translate(0, -100%) rotate(0deg);
  90. left: 24 * @rpx;
  91. }
  92. }
  93. &-bottom-right {
  94. transform: translate(0, 100%);
  95. &-arrow {
  96. top: 2 * @rpx;
  97. transform: translate(0, -100%) rotate(0deg);
  98. right: 24 * @rpx;
  99. }
  100. }
  101. &-left-top {
  102. transform: translate(-100%, 0);
  103. &-arrow {
  104. right: 2 * @rpx;
  105. transform: translate(75%, 0) rotate(90deg);
  106. top: 24 * @rpx;
  107. }
  108. }
  109. &-left-bottom {
  110. transform: translate(-100%, 0);
  111. &-arrow {
  112. right: 2 * @rpx;
  113. transform: translate(75%, 0) rotate(90deg);
  114. bottom: 24 * @rpx;
  115. }
  116. }
  117. &-right-top {
  118. transform: translate(100%, 0);
  119. &-arrow {
  120. left: 2 * @rpx;
  121. transform: translate(-75%, 0) rotate(-90deg);
  122. top: 24 * @rpx;
  123. }
  124. }
  125. &-right-bottom {
  126. transform: translate(100%, 0);
  127. &-arrow {
  128. left: 2 * @rpx;
  129. transform: translate(-75%, 0) rotate(-90deg);
  130. bottom: 24 * @rpx;
  131. }
  132. }
  133. }