diff --git a/styles/base.css b/styles/base.css index b267ba1..656f420 100644 --- a/styles/base.css +++ b/styles/base.css @@ -4,11 +4,14 @@ /* Enforce [hidden] even when a class sets an explicit display value */ [hidden] { display: none !important; } -/* overflow-x on both html and body prevents horizontal scroll and ensures - position:fixed elements anchor to the viewport on iOS Safari, where - overflow on body alone can cause fixed elements to position relative to - the body scroll container instead of the viewport. */ -html { scroll-behavior: smooth; overflow-x: hidden; } +/* overflow-x: clip on html prevents horizontal scroll without creating a + scroll container, so position:fixed elements (GitHub corner, theme toggle) + stay anchored to the viewport on scroll. Using overflow-x: hidden here + instead would turn into a scroll container and cause fixed elements + to be clipped as the page scrolls. overflow-x: hidden on body alone keeps + iOS Safari happy (prevents body acting as the scroll container for fixed + elements). */ +html { scroll-behavior: smooth; overflow-x: clip; } body { font-family: 'Share Tech Mono', 'Courier New', monospace;