From 349372ad82569d7ac93757f66e4f41b1bf11c17d Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Tue, 5 Aug 2025 23:49:13 +0200 Subject: [PATCH] style: fix horizontal scrollbar for some screen sizes (#3177) On the Fresh docs, I get a vertical scrollbar for a small range of viewport size of the browser. This is annoying me, since I get it when I place two windows next to each other on a 21:9 screen. The issue seems to stem from a button using `p-1 -m-1`. But the negative margin is there to address the increased space due to making the button easier to click (most likely for touch/mobile). But this makes the button overflow when there is no right-margin (`2xl:mr-0`). image ## Solution The simplest and easiest fix here is just to increase the margin to cover for this case. `2xl:mr-1` seems to do the trick. But it might be a good idea to have a little more gap towards the edge of the screen, e.g. `2xl-mr-2`. --- www/components/NavigationBar.tsx | 2 +- www/islands/ThemeToggle.tsx | 2 +- www/static/styles.css | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/www/components/NavigationBar.tsx b/www/components/NavigationBar.tsx index 2e774b89..47679940 100644 --- a/www/components/NavigationBar.tsx +++ b/www/components/NavigationBar.tsx @@ -22,7 +22,7 @@ export default function NavigationBar( const isDocs = props.active == "/docs"; return (