radames commited on
Commit
af2052f
Β·
1 Parent(s): fc59b67

fix safari error

Browse files
Files changed (1) hide show
  1. frontend/src/routes/index.svelte +9 -11
frontend/src/routes/index.svelte CHANGED
@@ -235,13 +235,13 @@
235
  {#each row as tile, index}
236
  <div class="tile {tile.letter && 'filled'} {tile.state && 'revealed'}">
237
  <div
238
- class="front {tile.correct === ' ' ? 'space' : ''}"
239
  style="transition-delay: {index * timePerTile}ms;"
240
  >
241
  <span class="letter">{tile.letter}</span>
242
  </div>
243
  <div
244
- class="back {tile.state}"
245
  style="transition-delay: {index * timePerTile}ms; animation-delay: {index * 100}ms;"
246
  >
247
  {tile.letter}
@@ -267,11 +267,9 @@
267
  }
268
 
269
  .tile {
270
- @apply w-full text-base text-center font-bold
271
  uppercase select-none relative bg-gray-50 text-black;
272
  vertical-align: middle;
273
- transform: translateZ(0);
274
- transform-style: preserve-3d;
275
  }
276
 
277
  .tile .filled {
@@ -280,8 +278,10 @@
280
 
281
  .tile .front,
282
  .tile .back {
283
- @apply box-border inline-flex justify-center items-center w-full h-full
284
  absolute top-0 left-0 transition-transform duration-500;
 
 
285
  }
286
  .tile .letter {
287
  @apply flex place-items-center h-full bg-gray-50 z-10;
@@ -300,15 +300,13 @@
300
  }
301
 
302
  .tile .back {
303
- transform: rotateX(180deg);
304
  }
305
-
306
  .tile.revealed .front {
307
- transform: rotateX(180deg);
308
  }
309
-
310
  .tile.revealed .back {
311
- transform: rotateX(0deg);
312
  }
313
 
314
  @keyframes zoom {
 
235
  {#each row as tile, index}
236
  <div class="tile {tile.letter && 'filled'} {tile.state && 'revealed'}">
237
  <div
238
+ class="front z-0 {tile.correct === ' ' ? 'space' : ''}"
239
  style="transition-delay: {index * timePerTile}ms;"
240
  >
241
  <span class="letter">{tile.letter}</span>
242
  </div>
243
  <div
244
+ class="back z-0 {tile.state}"
245
  style="transition-delay: {index * timePerTile}ms; animation-delay: {index * 100}ms;"
246
  >
247
  {tile.letter}
 
267
  }
268
 
269
  .tile {
270
+ @apply z-0 w-full text-base text-center font-bold
271
  uppercase select-none relative bg-gray-50 text-black;
272
  vertical-align: middle;
 
 
273
  }
274
 
275
  .tile .filled {
 
278
 
279
  .tile .front,
280
  .tile .back {
281
+ @apply z-10 box-border inline-flex justify-center items-center w-full h-full
282
  absolute top-0 left-0 transition-transform duration-500;
283
+ backface-visibility: hidden;
284
+ -webkit-backface-visibility: hidden;
285
  }
286
  .tile .letter {
287
  @apply flex place-items-center h-full bg-gray-50 z-10;
 
300
  }
301
 
302
  .tile .back {
303
+ transform: scale(0, 1);
304
  }
 
305
  .tile.revealed .front {
306
+ transform: scale(-1, 1);
307
  }
 
308
  .tile.revealed .back {
309
+ transform: scale(1, 1)
310
  }
311
 
312
  @keyframes zoom {