Skip to content

Commit a2a0736

Browse files
committed
fix search box layout on small screens when tv show is selected #443
1 parent 8565dbc commit a2a0736

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

src/static/css/main.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,6 @@
961961
.w-20 {
962962
width: calc(var(--spacing) * 20);
963963
}
964-
.w-32 {
965-
width: calc(var(--spacing) * 32);
966-
}
967964
.w-40 {
968965
width: calc(var(--spacing) * 40);
969966
}
@@ -1018,6 +1015,9 @@
10181015
.max-w-\[98\%\] {
10191016
max-width: 98%;
10201017
}
1018+
.max-w-\[110px\] {
1019+
max-width: 110px;
1020+
}
10211021
.max-w-\[250px\] {
10221022
max-width: 250px;
10231023
}
@@ -2474,11 +2474,21 @@
24742474
}
24752475
}
24762476
}
2477+
.sm\:w-32 {
2478+
@media (width >= 40rem) {
2479+
width: calc(var(--spacing) * 32);
2480+
}
2481+
}
24772482
.sm\:w-auto {
24782483
@media (width >= 40rem) {
24792484
width: auto;
24802485
}
24812486
}
2487+
.sm\:max-w-none {
2488+
@media (width >= 40rem) {
2489+
max-width: none;
2490+
}
2491+
}
24822492
.sm\:grid-cols-2 {
24832493
@media (width >= 40rem) {
24842494
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -2504,6 +2514,16 @@
25042514
justify-content: space-between;
25052515
}
25062516
}
2517+
.sm\:px-4 {
2518+
@media (width >= 40rem) {
2519+
padding-inline: calc(var(--spacing) * 4);
2520+
}
2521+
}
2522+
.sm\:whitespace-normal {
2523+
@media (width >= 40rem) {
2524+
white-space: normal;
2525+
}
2526+
}
25072527
.md\:absolute {
25082528
@media (width >= 48rem) {
25092529
position: absolute;

src/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ <h1 class="text-2xl font-semibold text-gray-100">Yamtrack</h1>
227227
<button type="button"
228228
@click="isOpen = !isOpen"
229229
@click.away="isOpen = false"
230-
class="flex items-center justify-between w-32 px-4 py-2 text-sm text-gray-300 bg-[#272c31] rounded-r-md focus:outline-none focus:ring-2 focus:ring-[#4a9eff] focus:ring-inset hover:bg-[#2a2e33] transition-colors duration-200 cursor-pointer">
231-
<span x-text="selectedType.display"></span>
230+
class="flex items-center justify-between max-w-[110px] sm:max-w-none sm:w-32 px-2 sm:px-4 py-2 text-sm text-gray-300 bg-[#272c31] rounded-r-md focus:outline-none focus:ring-2 focus:ring-[#4a9eff] focus:ring-inset hover:bg-[#2a2e33] transition-colors duration-200 cursor-pointer">
231+
<span class="truncate sm:whitespace-normal" x-text="selectedType.display"></span>
232232
<svg class="w-4 h-4 ml-2"
233233
fill="none"
234234
stroke="currentColor"

0 commit comments

Comments
 (0)