From 8d826b2f31f2fc8e51761b594ede21bb93dfcdcc Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 9 Jul 2026 12:59:29 +0200 Subject: [PATCH] Avoid showing gradients in especially small windows --- src/index.css | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/index.css b/src/index.css index 6cc094a91..ad18e25df 100644 --- a/src/index.css +++ b/src/index.css @@ -81,20 +81,22 @@ body { -webkit-tap-highlight-color: transparent; } -body[data-background="gradient"]::before { - content: ""; - position: fixed; - inset: 0; - background-image: url("graphics/mobile-gradient.svg"); - background-size: auto; - background-position: bottom; - background-repeat: no-repeat; -} +@media (min-height: 330px) { + body[data-background="gradient"]::before { + content: ""; + position: fixed; + inset: 0; + background-image: url("graphics/mobile-gradient.svg"); + background-size: auto; + background-position: bottom; + background-repeat: no-repeat; + } -body[data-background="gradient"][data-platform="desktop"]::before { - background-image: url("graphics/desktop-gradient.svg"); - background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh)); - background-position: center; + body[data-background="gradient"][data-platform="desktop"]::before { + background-image: url("graphics/desktop-gradient.svg"); + background-size: calc(max(1440px, 100vw)) calc(max(800px, 100vh)); + background-position: center; + } } /* This prohibits the view to scroll for pages smaller than 122px in width