From 79568bc5f49886c1344f0655b0c5e053c49f18c8 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Sun, 25 Jun 2023 16:11:51 +0200 Subject: [PATCH] Make table headers stick to the top --- CHANGELOG.md | 1 + frontend/src/components/grid.svelte | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54a7f56..fed9079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Made it possible (again) to input loose JSON into find view inputs, i.e. `{ key: 'val' }` or `{ 'num': 2 }` besides `{ "strict": "json" }`. * Improved error logging and dialogs. * Fixed host editing bug. +* Made table headers stick to the top. ## [v0.2.1] diff --git a/frontend/src/components/grid.svelte b/frontend/src/components/grid.svelte index 060f361..6db2162 100644 --- a/frontend/src/components/grid.svelte +++ b/frontend/src/components/grid.svelte @@ -107,13 +107,15 @@ background-color: #fff; } - table thead { - border-bottom: 2px solid #ccc; - } - th { + thead th { font-weight: 600; text-align: left; padding: 2px; + /* border-bottom: 2px solid #ccc; */ + box-shadow: 0 2px #ccc; + background-color: #fff; + position: sticky; + top: 0; } .grid :global(.blankstate) {