|
75 | 75 |
|
76 | 76 | /* has tip triangle */
|
77 | 77 | &.spectrum-Popover--withTip {
|
| 78 | + /* Prevents clipping of the tip */ |
| 79 | + overflow: visible; |
| 80 | + |
78 | 81 | .spectrum-Popover-tip {
|
79 | 82 | /* triangle polygon */
|
80 | 83 | .spectrum-Popover-tip-triangle {
|
|
115 | 118 |
|
116 | 119 | /* popover animates upward ⬆ */
|
117 | 120 | &.is-open {
|
118 |
| - transform: translateY(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))); |
| 121 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 122 | + transform: translateY(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))) translateZ(0); |
119 | 123 | }
|
120 | 124 | }
|
121 | 125 |
|
|
133 | 137 |
|
134 | 138 | /* popover animates downward ⬇ */
|
135 | 139 | &.is-open {
|
136 |
| - transform: translateY(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))); |
| 140 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 141 | + transform: translateY(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))) translateZ(0); |
137 | 142 | }
|
138 | 143 | }
|
139 | 144 |
|
|
150 | 155 |
|
151 | 156 | /* popover animates towards right ⮕ */
|
152 | 157 | &.is-open {
|
153 |
| - transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))); |
| 158 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 159 | + transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))) translateZ(0); |
154 | 160 | }
|
155 | 161 | }
|
156 | 162 |
|
|
167 | 173 |
|
168 | 174 | /* popover animates towards left ⬅ */
|
169 | 175 | &.is-open {
|
170 |
| - transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))); |
| 176 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 177 | + transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))) translateZ(0); |
171 | 178 | }
|
172 | 179 | }
|
173 | 180 |
|
|
183 | 190 |
|
184 | 191 | /* LTR read, popover animates towards left ⬅ */
|
185 | 192 | &.is-open {
|
186 |
| - transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))); |
| 193 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 194 | + transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))) translateZ(0); |
187 | 195 | }
|
188 | 196 |
|
189 | 197 | /* RTL read, popover animates towards right ⮕ */
|
190 | 198 | &.is-open:dir(rtl) {
|
191 |
| - transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))); |
| 199 | + transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))) translateZ(0); |
192 | 200 | }
|
193 | 201 | }
|
194 | 202 |
|
|
204 | 212 |
|
205 | 213 | /* LTR read, popover animates towards right ⮕ */
|
206 | 214 | &.is-open {
|
207 |
| - transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))); |
| 215 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 216 | + transform: translateX(var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance))) translateZ(0); |
208 | 217 | }
|
209 | 218 |
|
210 | 219 | /* RTL read, popover animates towards left ⬅ */
|
211 | 220 | &:dir(rtl) {
|
212 | 221 | &.is-open {
|
213 |
| - transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))); |
| 222 | + /* TranslateZ is Safari fix to prevent clipping of filter dropshadow and accelerate the element to GPU layer */ |
| 223 | + transform: translateX(calc(-1 * var(--mod-popover-animation-distance, var(--spectrum-popover-animation-distance)))) translateZ(0); |
214 | 224 | }
|
215 | 225 | }
|
216 | 226 | }
|
|
0 commit comments