Skip to content

Commit 724d175

Browse files
committed
web: grid scrolls inside its wrapper on narrow screens; page never overflows
1 parent a837c7f commit 724d175

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎web/src/App.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function label(key: string): string {
3838
</script>
3939

4040
<template>
41-
<header class="px-6 pt-6 pb-5">
41+
<header class="max-w-full px-6 pt-6 pb-5">
4242
<div class="flex items-start justify-between gap-4">
4343
<h1 class="text-2xl font-semibold tracking-tight">NativeScript compatibility</h1>
4444
<ThemeToggle />
@@ -63,7 +63,7 @@ function label(key: string): string {
6363
type="search"
6464
placeholder="Filter by package, version or tag…"
6565
aria-label="Filter releases"
66-
class="w-80 rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm placeholder:text-neutral-400 focus:border-declared focus:ring-2 focus:ring-declared/30 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"
66+
class="w-full rounded-lg border sm:w-80 border-neutral-300 bg-white px-3 py-2 text-sm placeholder:text-neutral-400 focus:border-declared focus:ring-2 focus:ring-declared/30 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"
6767
/>
6868
<label class="flex cursor-pointer items-center gap-2 text-sm">
6969
<input v-model="showPrereleases" type="checkbox" class="size-4 accent-declared" />

‎web/src/components/CompatGrid.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ const headCell = `sticky z-10 bg-neutral-50 text-center font-semibold dark:bg-ne
8282
</script>
8383

8484
<template>
85-
<div class="border-y border-neutral-200 dark:border-neutral-700/80">
85+
<!-- Below the desktop breakpoint the grid scrolls sideways inside this wrapper; above it, the
86+
table fits the page, the wrapper does not clip, and the header can stay pinned. -->
87+
<div class="overflow-x-auto border-y border-neutral-200 lg:overflow-visible dark:border-neutral-700/80">
8688
<table class="w-full min-w-[60rem] table-fixed border-separate border-spacing-0 text-sm">
8789
<colgroup>
8890
<col class="w-88" />

‎web/src/style.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
--color-bad: #f26b66;
2727
}
2828
body {
29-
@apply bg-white text-neutral-900 antialiased dark:bg-neutral-950 dark:text-neutral-100;
29+
@apply overflow-x-hidden bg-white text-neutral-900 antialiased dark:bg-neutral-950 dark:text-neutral-100;
3030
}
3131
}
3232

0 commit comments

Comments
 (0)