Skip to content

Commit 1006fc2

Browse files
style: card grid on mobile
1 parent 5e85be7 commit 1006fc2

2 files changed

Lines changed: 7 additions & 22 deletions

File tree

src/lib/components/card-grid/CardGrid.svelte

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@
7878
justify-content: center;
7979
place-items: center;
8080
81-
@include mobile {
82-
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
83-
gap: var(--spacing-md);
84-
}
85-
8681
&:last-child {
8782
padding-bottom: var(--spacing-lg);
8883
}
@@ -91,11 +86,4 @@
9186
.card-wrapper {
9287
width: 100%;
9388
}
94-
95-
@media (max-width: 640px) {
96-
.card-grid {
97-
grid-template-columns: 1fr;
98-
grid-template-columns: repeat(2, 1fr);
99-
}
100-
}
10189
</style>

src/lib/components/recipe-card/RecipeCard.svelte

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@
196196
class="portal-dropdown-container"
197197
style="position: fixed; top: {dropdownPosition.top}px; left: {dropdownPosition.left}px; z-index: 1000;"
198198
>
199-
<Dropdown bind:isOpen={menuOpen} nbrOfItems={Object.keys(menu.options).length} swallowOn={menuButton}>
199+
<Dropdown
200+
bind:isOpen={menuOpen}
201+
nbrOfItems={Object.keys(menu.options).length}
202+
swallowOn={menuButton}
203+
>
200204
{#snippet dropdownContent(item)}
201205
{#each Object.entries(menu.options) as [label, action], i}
202206
{#snippet menuLabel()}
@@ -224,6 +228,7 @@
224228
grid-template-rows: 60% auto;
225229
height: 435px;
226230
width: 100%;
231+
min-width: 200px;
227232
border-radius: var(--border-radius-2xl);
228233
text-decoration: none;
229234
overflow: hidden;
@@ -238,14 +243,6 @@
238243
height: 300px;
239244
grid-template-rows: 45% auto;
240245
241-
.content {
242-
padding: var(--spacing-sm);
243-
}
244-
245-
.meta-single > span {
246-
font-size: var(--font-size-xs);
247-
}
248-
249246
.action-buttons {
250247
top: var(--spacing-sm);
251248
right: var(--spacing-sm);
@@ -299,7 +296,7 @@
299296
-webkit-box-orient: vertical;
300297
301298
@include mobile {
302-
font-size: var(--font-size-lg);
299+
font-size: var(--font-size-xl);
303300
}
304301
}
305302

0 commit comments

Comments
 (0)