Skip to content

Commit

Permalink
Debug stacking issue with rear cells in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
brodysmith1 committed Feb 27, 2024
1 parent 491e87a commit 990d5da
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/lib/components/Farm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
id="farm-wrapper"
bind:this={farmWrapperElement}
use:pan={{ delay: 0 }}
use:pinch={{ delay: 0 }}
use:pinch
on:pandown={(e) => {
// if (e.detail.event.pointerType === "mouse") disableGestures = false
// else disableGestures = false
Expand Down Expand Up @@ -196,16 +196,6 @@
position: relative
justify-content: center
border-radius: var(--border-radius)
transform-origin: center
transform-style: preserve-3d
-webkit-transform-origin: center
-webkit-transform-style: preserve-3d
*, *::before, *::after
transform-origin: center
transform-style: preserve-3d
-webkit-transform-origin: center
-webkit-transform-style: preserve-3d
#reset-transform-button
position: absolute
Expand Down Expand Up @@ -241,6 +231,10 @@
z-index: 1
background: var(--color-primary-0)
border: 1px solid var(--color-primary-0)
transform-origin: center
transform-style: preserve-3d
-webkit-transform-origin: center
-webkit-transform-style: preserve-3d
.levitate &
animation: levitate 1s ease-in-out infinite alternate
Expand All @@ -265,10 +259,10 @@
background: var(--color-primary-0)
&::after
width: calc(0.375rem)
width: 0.375rem
height: 141.4213% // ~ sqrt(2)
transform: rotateZ(-45deg) rotateY(-60deg) translate(calc(-0.375rem - 1px), 0)
transform-origin: top
transform-origin: top left
-webkit-transform-origin: top left
&::before
Expand All @@ -294,6 +288,7 @@
user-select: none
pointer-events: all
transition: background 0.2s, transform 0.2s ease-out
z-index: 10
&.swappable, &.unswappable
cursor: none
Expand All @@ -310,6 +305,10 @@
background: var(--color-tertiary-2)
animation: flash 0.5s ease-in-out infinite alternate
.food-item-fill,
.food-item-image
pointer-events: none
.food-item-fill
position: absolute
z-index: 0
Expand Down

0 comments on commit 990d5da

Please sign in to comment.