|
49 | 49 | }
|
50 | 50 |
|
51 | 51 | // Offset the popover to account for the dropdown arrow
|
52 |
| - &-show-arrow&-placement-topCenter, |
53 | 52 | &-show-arrow&-placement-topLeft,
|
| 53 | + &-show-arrow&-placement-top, |
54 | 54 | &-show-arrow&-placement-topRight {
|
55 | 55 | padding-bottom: @popover-distance;
|
56 | 56 | }
|
57 | 57 |
|
58 |
| - &-show-arrow&-placement-bottomCenter, |
59 | 58 | &-show-arrow&-placement-bottomLeft,
|
| 59 | + &-show-arrow&-placement-bottom, |
60 | 60 | &-show-arrow&-placement-bottomRight {
|
61 | 61 | padding-top: @popover-distance;
|
62 | 62 | }
|
|
68 | 68 | position: absolute;
|
69 | 69 | z-index: 1; // lift it up so the menu wouldn't cask shadow on it
|
70 | 70 | display: block;
|
71 |
| - width: sqrt(@popover-arrow-width * @popover-arrow-width * 2); |
72 |
| - height: sqrt(@popover-arrow-width * @popover-arrow-width * 2); |
73 |
| - background: transparent; |
74 |
| - border-style: solid; |
75 |
| - border-width: (sqrt(@popover-arrow-width * @popover-arrow-width * 2) / 2); |
76 |
| - transform: rotate(45deg); |
| 71 | + width: @popover-arrow-width; |
| 72 | + height: @popover-arrow-width; |
| 73 | + background: linear-gradient( |
| 74 | + 135deg, |
| 75 | + transparent 40%, |
| 76 | + @popover-bg 40% |
| 77 | + ); // Use linear-gradient to prevent arrow from covering text |
| 78 | + .roundedArrow(@popover-arrow-width, 5px, @popover-bg); |
77 | 79 | }
|
78 | 80 |
|
79 |
| - &-placement-topCenter > &-arrow, |
| 81 | + &-placement-top > &-arrow, |
80 | 82 | &-placement-topLeft > &-arrow,
|
81 | 83 | &-placement-topRight > &-arrow {
|
82 |
| - bottom: @popover-distance - @popover-arrow-width + 2.2px; |
83 |
| - border-color: transparent @popover-bg @popover-bg transparent; |
84 |
| - box-shadow: 3px 3px 7px fade(@black, 7%); |
| 84 | + bottom: @popover-arrow-width * sqrt((1 / 2)) + 2px; |
| 85 | + box-shadow: 3px 3px 7px -3px fade(@black, 10%); |
| 86 | + transform: rotate(45deg); |
85 | 87 | }
|
86 | 88 |
|
87 |
| - &-placement-topCenter > &-arrow { |
| 89 | + &-placement-top > &-arrow { |
88 | 90 | left: 50%;
|
89 | 91 | transform: translateX(-50%) rotate(45deg);
|
90 | 92 | }
|
|
97 | 99 | right: 16px;
|
98 | 100 | }
|
99 | 101 |
|
100 |
| - &-placement-bottomCenter > &-arrow, |
| 102 | + &-placement-bottom > &-arrow, |
101 | 103 | &-placement-bottomLeft > &-arrow,
|
102 | 104 | &-placement-bottomRight > &-arrow {
|
103 |
| - top: @popover-distance - @popover-arrow-width + 2px; |
104 |
| - border-color: @popover-bg transparent transparent @popover-bg; |
105 |
| - box-shadow: -2px -2px 5px fade(@black, 6%); |
| 105 | + top: (@popover-arrow-width + 2px) * sqrt((1 / 2)); |
| 106 | + box-shadow: 2px 2px 5px -2px fade(@black, 10%); |
| 107 | + transform: rotate(-135deg) translateY(-0.5px); |
106 | 108 | }
|
107 | 109 |
|
108 |
| - &-placement-bottomCenter > &-arrow { |
| 110 | + &-placement-bottom > &-arrow { |
109 | 111 | left: 50%;
|
110 |
| - transform: translateX(-50%) rotate(45deg); |
| 112 | + transform: translateX(-50%) rotate(-135deg) translateY(-0.5px); |
111 | 113 | }
|
112 | 114 |
|
113 | 115 | &-placement-bottomLeft > &-arrow {
|
|
219 | 221 | background-color: @dropdown-selected-bg;
|
220 | 222 | }
|
221 | 223 |
|
222 |
| - &:hover { |
| 224 | + &:hover, |
| 225 | + &&-active { |
223 | 226 | background-color: @item-hover-bg;
|
224 | 227 | }
|
225 | 228 |
|
|
299 | 302 |
|
300 | 303 | &.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomLeft,
|
301 | 304 | &.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomLeft,
|
302 |
| - &.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomCenter, |
303 |
| - &.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomCenter, |
| 305 | + &.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottom, |
| 306 | + &.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottom, |
304 | 307 | &.@{ant-prefix}-slide-down-enter.@{ant-prefix}-slide-down-enter-active&-placement-bottomRight,
|
305 | 308 | &.@{ant-prefix}-slide-down-appear.@{ant-prefix}-slide-down-appear-active&-placement-bottomRight {
|
306 | 309 | animation-name: antSlideUpIn;
|
307 | 310 | }
|
308 | 311 |
|
309 | 312 | &.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topLeft,
|
310 | 313 | &.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topLeft,
|
311 |
| - &.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topCenter, |
312 |
| - &.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topCenter, |
| 314 | + &.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-top, |
| 315 | + &.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-top, |
313 | 316 | &.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topRight,
|
314 | 317 | &.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topRight {
|
315 | 318 | animation-name: antSlideDownIn;
|
316 | 319 | }
|
317 | 320 |
|
318 | 321 | &.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomLeft,
|
319 |
| - &.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomCenter, |
| 322 | + &.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottom, |
320 | 323 | &.@{ant-prefix}-slide-down-leave.@{ant-prefix}-slide-down-leave-active&-placement-bottomRight {
|
321 | 324 | animation-name: antSlideUpOut;
|
322 | 325 | }
|
323 | 326 |
|
324 | 327 | &.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topLeft,
|
325 |
| - &.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topCenter, |
| 328 | + &.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-top, |
326 | 329 | &.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topRight {
|
327 | 330 | animation-name: antSlideDownOut;
|
328 | 331 | }
|
|
0 commit comments