From cd0421393106b31ae7d57a26d20494cc172e1ff6 Mon Sep 17 00:00:00 2001 From: Nick Oates Date: Sat, 7 Sep 2024 19:57:52 -0700 Subject: [PATCH] CoverTheme: Fix black background on search results --- plugins/CoverTheme/src/transparent.css | 36 +++++++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/plugins/CoverTheme/src/transparent.css b/plugins/CoverTheme/src/transparent.css index 1066a7e..74bdbfd 100644 --- a/plugins/CoverTheme/src/transparent.css +++ b/plugins/CoverTheme/src/transparent.css @@ -59,16 +59,38 @@ main, overflow: hidden; } -/* Use cover colors in album/artist/playlist overlay instead of black */ -.tidal-ui__z-stack > :not(:has(div)) { - background-image: linear-gradient( +/* This looks weird when the background isn't dark, better to just remove it. */ +[class^="bottomGradient"] { + display: none; +} + +:root { + --cover-gradient: linear-gradient( 90deg, rgb(var(--cover-DarkVibrant), 0.5), rgb(var(--cover-LightVibrant), 0.5) - ) !important; + ); } -/* This looks weird when the background isn't dark, better to just remove it. */ -[class^="bottomGradient"] { - display: none; +/* Use cover colors in album/artist/playlist overlay */ +.tidal-ui__z-stack > :not(:has(div)) { + background-image: var(--cover-gradient) !important; +} + +/* Use cover colors in search results header */ +[data-test="search-results-top"] { + > [class*="container--"]::before { + background-image: var(--cover-gradient); + z-index: -1; + left: -36px; + right: -36px; + height: calc(var(--topSpacing) + 50px); + } + + > [class*="container--"] { + background-color: unset; + [class*="divider"] { + background-color: unset; + } + } }