Skip to content

Commit

Permalink
CoverTheme: Allow changing opacity via CSS variable
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ckoates committed Nov 2, 2024
1 parent 6fc2d1e commit 4f2ded2
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions plugins/CoverTheme/src/transparent.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
:root {
--cover-opacity: 0.5;
--cover-gradient: linear-gradient(
90deg,
rgb(var(--cover-DarkVibrant), var(--cover-opacity)),
rgb(var(--cover-LightVibrant), var(--cover-opacity))
);
}

body,
#nowPlaying {
background-image: radial-gradient(
ellipse at top left,
rgb(var(--cover-DarkVibrant), 0.5),
rgb(var(--cover-DarkVibrant), var(--cover-opacity)),
transparent 70%
),
radial-gradient(
ellipse at center left,
rgb(var(--cover-Vibrant), 0.5),
rgb(var(--cover-Vibrant), var(--cover-opacity)),
transparent 70%
),
radial-gradient(
ellipse at bottom left,
rgb(var(--cover-LightMuted), 0.5),
rgb(var(--cover-LightMuted), var(--cover-opacity)),
transparent 70%
),
radial-gradient(
ellipse at top right,
rgb(var(--cover-LightVibrant), 0.5),
rgb(var(--cover-LightVibrant), var(--cover-opacity)),
transparent 70%
),
radial-gradient(
ellipse at center right,
rgb(var(--cover-Muted), 0.5),
rgb(var(--cover-Muted), var(--cover-opacity)),
transparent 70%
),
radial-gradient(
ellipse at bottom right,
rgb(var(--cover-DarkMuted), 0.5),
rgb(var(--cover-DarkMuted), var(--cover-opacity)),
transparent 70%
) !important;
}
Expand Down Expand Up @@ -64,14 +73,6 @@ main,
display: none;
}

:root {
--cover-gradient: linear-gradient(
90deg,
rgb(var(--cover-DarkVibrant), 0.5),
rgb(var(--cover-LightVibrant), 0.5)
);
}

/* Use cover colors in album/artist/playlist overlay */
[class*="smallHeader--"]::before {
background-image: var(--cover-gradient) !important;
Expand Down

0 comments on commit 4f2ded2

Please sign in to comment.