Skip to content

Commit fdc1626

Browse files
morningDclaude
andcommitted
Fix rabbit speech bubble clipping in Safari
Safari clips absolutely-positioned children when the parent has a CSS filter. Move speech bubbles outside the .rabbit div (which carries drop-shadow) so they render as independent scene elements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0ad5575 commit fdc1626

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

docs/.vitepress/components/PixelRobots.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,9 +2379,14 @@ function onSnakeClick(idx) {
23792379
<!-- Front paw -->
23802380
<ellipse cx="21" cy="27.5" rx="2.5" ry="2" :fill="r.colors.paw" :stroke="r.colors.dark" stroke-width="0.3" />
23812381
</svg>
2382-
<!-- Speech bubble -->
2382+
</div>
2383+
2384+
<!-- Speech bubbles — rendered outside .rabbit to avoid Safari filter clipping -->
2385+
<div v-for="(r, i) in rabbits" :key="'rbub' + i">
23832386
<div v-if="r.bubble" class="rabbit-bubble" :class="{ 'rabbit-bubble-dark': isDark }"
23842387
:style="{
2388+
left: r.x + 'px',
2389+
bottom: (groundY - r.y + 34) + 'px',
23852390
opacity: Math.min(1, r.bubble.timer / 15, (120 - r.bubble.timer + 15) / 15),
23862391
transform: 'translateX(-50%)'
23872392
}">
@@ -2652,8 +2657,6 @@ function onSnakeClick(idx) {
26522657
}
26532658
.rabbit-bubble {
26542659
position: absolute;
2655-
bottom: 100%;
2656-
left: 50%;
26572660
background: rgba(255, 255, 255, 0.92);
26582661
border: 1.5px solid rgba(0, 0, 0, 0.12);
26592662
border-radius: 10px;
@@ -2665,7 +2668,6 @@ function onSnakeClick(idx) {
26652668
pointer-events: none;
26662669
font-family: system-ui, -apple-system, sans-serif;
26672670
z-index: 20;
2668-
margin-bottom: 4px;
26692671
}
26702672
.rabbit-bubble::after {
26712673
content: '';

0 commit comments

Comments
 (0)