|
7 | 7 | .@{dropdown-prefix-cls} {
|
8 | 8 | .reset-component();
|
9 | 9 |
|
| 10 | + --antd-arrow-background-color: @dropdown-menu-bg; |
| 11 | + |
10 | 12 | position: absolute;
|
11 | 13 | top: -9999px;
|
12 | 14 | left: -9999px;
|
|
15 | 17 |
|
16 | 18 | &::before {
|
17 | 19 | position: absolute;
|
18 |
| - top: -@popover-distance + @popover-arrow-width; |
19 |
| - right: 0; |
20 |
| - bottom: -@popover-distance + @popover-arrow-width; |
21 |
| - left: -7px; |
| 20 | + inset-block: calc(@popover-arrow-width / 2 - @popover-distance); |
22 | 21 | z-index: -9999;
|
23 | 22 | opacity: 0.0001;
|
24 |
| - content: ' '; |
| 23 | + content: ''; |
25 | 24 | }
|
26 | 25 |
|
27 | 26 | &-wrap {
|
|
48 | 47 | display: none;
|
49 | 48 | }
|
50 | 49 |
|
51 |
| - // Offset the popover to account for the dropdown arrow |
52 |
| - &-show-arrow&-placement-topLeft, |
53 |
| - &-show-arrow&-placement-top, |
54 |
| - &-show-arrow&-placement-topRight { |
55 |
| - padding-bottom: @popover-distance; |
56 |
| - } |
57 |
| - |
58 |
| - &-show-arrow&-placement-bottomLeft, |
59 |
| - &-show-arrow&-placement-bottom, |
60 |
| - &-show-arrow&-placement-bottomRight { |
61 |
| - padding-top: @popover-distance; |
62 |
| - } |
63 |
| - |
64 |
| - // Arrows |
65 |
| - // .popover-arrow is outer, .popover-arrow:after is inner |
66 |
| - |
67 |
| - &-arrow { |
68 |
| - position: absolute; |
69 |
| - z-index: 1; // lift it up so the menu wouldn't cask shadow on it |
70 |
| - display: block; |
71 |
| - width: @popover-arrow-width; |
72 |
| - height: @popover-arrow-width; |
73 |
| - .roundedArrow(@popover-arrow-width, 5px, @popover-bg); |
74 |
| - } |
75 |
| - |
76 |
| - &-placement-top > &-arrow, |
77 |
| - &-placement-topLeft > &-arrow, |
78 |
| - &-placement-topRight > &-arrow { |
79 |
| - bottom: @popover-arrow-width * sqrt((1 / 2)) + 2px; |
80 |
| - box-shadow: 3px 3px 7px -3px fade(@black, 10%); |
81 |
| - transform: rotate(45deg); |
82 |
| - } |
83 |
| - |
84 |
| - &-placement-top > &-arrow { |
85 |
| - left: 50%; |
86 |
| - transform: translateX(-50%) rotate(45deg); |
87 |
| - } |
88 |
| - |
89 |
| - &-placement-topLeft > &-arrow { |
90 |
| - left: 16px; |
91 |
| - } |
92 |
| - |
93 |
| - &-placement-topRight > &-arrow { |
94 |
| - right: 16px; |
95 |
| - } |
96 |
| - |
97 |
| - &-placement-bottom > &-arrow, |
98 |
| - &-placement-bottomLeft > &-arrow, |
99 |
| - &-placement-bottomRight > &-arrow { |
100 |
| - top: (@popover-arrow-width + 2px) * sqrt((1 / 2)); |
101 |
| - box-shadow: 2px 2px 5px -2px fade(@black, 10%); |
102 |
| - transform: rotate(-135deg) translateY(-0.5px); |
103 |
| - } |
104 |
| - |
105 |
| - &-placement-bottom > &-arrow { |
106 |
| - left: 50%; |
107 |
| - transform: translateX(-50%) rotate(-135deg) translateY(-0.5px); |
108 |
| - } |
109 |
| - |
110 |
| - &-placement-bottomLeft > &-arrow { |
111 |
| - left: 16px; |
112 |
| - } |
113 |
| - |
114 |
| - &-placement-bottomRight > &-arrow { |
115 |
| - right: 16px; |
116 |
| - } |
| 50 | + // Arrow Style |
| 51 | + .placementArrow(@popover-arrow-width, 4px, @arrow-border-radius, var(--antd-arrow-background-color), @popover-arrow-box-shadow); |
117 | 52 |
|
118 | 53 | &-menu {
|
119 | 54 | position: relative;
|
|
0 commit comments