From fe6a45bc1d2fe03753cb99b9f179c7f196a601a0 Mon Sep 17 00:00:00 2001 From: codey Date: Sat, 9 Aug 2025 07:28:26 -0400 Subject: [PATCH] CSS changes: light/dark theming for radio lrc-text --- src/assets/styles/player.css | 93 ++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/src/assets/styles/player.css b/src/assets/styles/player.css index 0d63938..7a7e43e 100644 --- a/src/assets/styles/player.css +++ b/src/assets/styles/player.css @@ -5,6 +5,22 @@ box-sizing: border-box; } +:root { + --lrc-text-color: #333; /* darker text */ + --lrc-bg-color: rgba(0, 0, 0, 0.05); + --lrc-active-color: #000; /* bold black for active */ + --lrc-active-shadow: none; /* no glow in light mode */ + --lrc-hover-color: #005fcc; /* darker blue hover */ +} + +[data-theme="dark"] { + --lrc-text-color: #ccc; /* original gray */ + --lrc-bg-color: rgba(255, 255, 255, 0.02); + --lrc-active-color: #fff; /* bright white for active */ + --lrc-active-shadow: 0 0 4px rgba(212, 175, 55, 0.6); /* gold glow */ + --lrc-hover-color: #4fa2ff; /* original blue hover */ +} + body { font-family: "Mukta", sans-serif; width: 100%; @@ -242,29 +258,56 @@ body { opacity: 1; pointer-events: auto; transition: opacity 0.3s ease; - max-height: 125px; /* limit block height */ + max-height: 125px; max-width: 100%; - overflow-y: auto; /* scroll if lyrics exceed height */ + overflow-y: auto; margin-top: 1rem; padding: 0 1rem 1rem; text-align: center; font-family: "Mukta", sans-serif; font-size: 0.85rem; line-height: 1.4; - color: #ccc; /* subtle default color */ - user-select: none; /* prevent accidental text selection */ - background-color: rgba(0, 0, 0, 0.05); /* very light highlight behind text */ - border-radius: 0.375rem; /* rounded corners */ - box-shadow: inset 0 0 5px rgba(0,0,0,0.8); + color: var(--lrc-text-color); + user-select: none; + background-color: var(--lrc-bg-color); + border-radius: 0.375rem; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8); box-sizing: border-box; - scrollbar-width: thin; /* Firefox thinner scrollbar */ + scrollbar-width: thin; scrollbar-color: #999 transparent; scroll-padding-bottom: 1rem; } .lrc-text.empty { - opacity: 0; /* fully transparent */ - pointer-events: none; /* disable interaction */ + opacity: 0; + pointer-events: none; +} + +.lrc-line { + margin: 0.1rem 0; + white-space: normal; + word-wrap: break-word; + line-height: 1.4; + transition: color 0.3s ease, font-weight 0.3s ease, text-shadow 0.3s ease; + color: inherit; + cursor: default; + font-size: 0.85rem; +} + +.lrc-line.active { + color: var(--lrc-active-color); + font-weight: 600; + font-size: 0.8rem; + text-shadow: var(--lrc-active-shadow); +} + +.lrc-line:hover { + color: var(--lrc-hover-color); + text-decoration: dotted underline; +} + +.lrc-line:last-child { + margin-bottom: 0.5rem; } .lrc-text::-webkit-scrollbar { @@ -278,34 +321,4 @@ body { .lrc-text::-webkit-scrollbar-thumb { background-color: #999; border-radius: 3px; -} - -/* Each lyric line */ -.lrc-line { - margin: 0.1rem 0; - white-space: normal; - word-wrap: break-word; - line-height: 1.4; - transition: color 0.3s ease, font-weight 0.3s ease; - color: inherit; - cursor: default; - font-size: 0.85rem; -} - -/* Highlight the active lyric line */ -.lrc-line.active { - color: #ffffff; - font-weight: 600; - font-size: 0.8rem; - text-shadow: 0 0 4px rgba(212, 175, 55, 0.6); -} - - -.lrc-line:hover { - color: #4fa2ff; - text-decoration: dotted underline; -} - -.lrc-line:last-child { - margin-bottom: 0.5rem; /* or 0.75rem */ } \ No newline at end of file