From 29b455c529f092c2c7ad447f8a574723c1fe4bc5 Mon Sep 17 00:00:00 2001 From: Nasir Anthony Montalvo Date: Sun, 1 Feb 2026 18:05:41 -0600 Subject: [PATCH] fixing scroll to top button --- _sass/_custom.scss | 53 +++++++--------------------------------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/_sass/_custom.scss b/_sass/_custom.scss index 26b0679..7d66e6b 100644 --- a/_sass/_custom.scss +++ b/_sass/_custom.scss @@ -1222,13 +1222,6 @@ html { box-sizing: border-box; } -body { - overflow-x: hidden; - max-width: 100vw; - /* Forces the body to respect the viewport in landscape too */ - min-width: 0; -} - /* Catch-all: any block element that might overflow */ *, *::before, @@ -1267,49 +1260,19 @@ figure { SCROLL TO TOP - FULL STYLING (all viewports) ============================================================================ */ -#scroll-to-top { - position: fixed; - bottom: 1.5rem; - right: 1.5rem; - z-index: 9999; - width: 40px; - height: 40px; - /* No display rule here — JS toggles between none and block */ - text-align: center; - line-height: 40px; /* vertically centers the SVG without needing flex */ - background: rgba(0, 0, 0, 0.65); - border: var(--border-width) solid rgba(255, 255, 255, 0.35) !important; - border-radius: 50%; - color: rgba(255, 255, 255, 0.85) !important; - text-decoration: none; - transition: border-color var(--transition-normal), color var(--transition-normal), transform var(--transition-normal); - margin: 0 !important; - padding: 0 !important; -} - -#scroll-to-top:hover { - border-color: rgba(255, 255, 255, 0.75); - color: #ffffff !important; - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); -} - -#scroll-to-top svg { - width: 16px; - height: 16px; - fill: currentColor; -} - -@media (max-width: 768px) { #scroll-to-top { - bottom: 1rem; + position: fixed; + bottom: 4.5rem; right: 1rem; - width: 36px; - height: 36px; - line-height: 36px; /* must match height */ + z-index: 9999; + transition: transform 0.2s ease, box-shadow 0.2s ease; } +#scroll-to-top:hover { + transform: translateY(-2px); + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); } + /* ============================================================================ LONG LINKS & BIBLIOGRAPHY - OVERFLOW FIX ============================================================================ */