Skip to content

Commit fb76fa4

Browse files
committed
fix card view too big on mobile [#460](#460)
1 parent 970478b commit fb76fa4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/static/css/input.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@import "tailwindcss" source("../../");
22

3+
@theme {
4+
--breakpoint-xs: 30rem;
5+
}
6+
37
[x-cloak] {
48
display: none !important;
59
}
@@ -21,8 +25,9 @@
2125
clip-path: inset(0 50% 0 0);
2226
}
2327

28+
2429
.media-grid {
25-
@apply grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-4;
30+
@apply grid grid-cols-2 xs:grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-4;
2631
}
2732

2833
/* https://tailwindcss.com/docs/upgrade-guide#hover-styles-on-mobile */

src/static/css/main.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@
383383
}
384384
.container {
385385
width: 100%;
386+
@media (width >= 30rem) {
387+
max-width: 30rem;
388+
}
386389
@media (width >= 40rem) {
387390
max-width: 40rem;
388391
}
@@ -2600,8 +2603,11 @@
26002603
}
26012604
.media-grid {
26022605
display: grid;
2603-
grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
2606+
grid-template-columns: repeat(2, minmax(0, 1fr));
26042607
gap: calc(var(--spacing) * 4);
2608+
@media (width >= 30rem) {
2609+
grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
2610+
}
26052611
}
26062612
.toast-error {
26072613
border-color: var(--color-red-600);

0 commit comments

Comments
 (0)