Skip to content

Commit

Permalink
Fix alignment of 4x4 grid, use small card style in preview (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta authored Dec 28, 2023
1 parent 444805c commit 6f10ec0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Binary file modified public/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions src/views/Pileon/Pileon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
calculateDimensions,
fillerStacks,
} from "../../utils/pileon";
import { getStackDataTransfer } from "../../utils/stack";
import { getStackDataTransfer, stackWidthEm } from "../../utils/stack";
import DeadEndModal from "./DeadEndModal.svelte";
import PileonHelp from "./PileonHelp.svelte";
Expand Down Expand Up @@ -163,7 +163,7 @@
style:width="{d.tableWidthEm * 1.25}em"
>
{#each piles as pile, index}
<div class="pile" class:small={size === "small"}>
<div class="pile">
<Stack
cards={pile}
closed={donePiles.includes(index)}
Expand All @@ -178,7 +178,7 @@
</div>
{/each}
{#each fillerStacks(mainWidth, innerHeight) as _}
<div class="pile" />
<div class="pile" style={`min-width: ${stackWidthEm(4, size)}em`} />
{/each}
</main>
{#if helpOpen}
Expand All @@ -200,6 +200,7 @@
align-items: center
justify-content: center
max-width: 100vw
column-gap: 0.5em
row-gap: 0.5em
margin: auto
Expand All @@ -209,9 +210,6 @@
.pile
flex-basis: 16.7% /* Just above 1/6 */
&.small
margin: 0.25em 0.333em
@media (max-aspect-ratio: 4/3)
flex-basis: 20.1% /* Just above 1/5 */
Expand Down

0 comments on commit 6f10ec0

Please sign in to comment.