From a87b8e11bb80f9aebf80a3c8226dfbe226a07a48 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sat, 24 Jan 2026 11:23:05 -0600 Subject: [PATCH] refactor: move action button styles to shared app.css - Extract .action-btn-circle styles to app.css for reuse - Remove duplicate button styles from ArtistDetailView and AlbumDetailView - Use theme-aware colors (--text-primary) instead of hardcoded white - Icons now use currentColor for theme compatibility --- src/app.css | 46 ++++++++++++++++ .../components/views/AlbumDetailView.svelte | 53 ++----------------- .../components/views/ArtistDetailView.svelte | 34 +----------- 3 files changed, 52 insertions(+), 81 deletions(-) diff --git a/src/app.css b/src/app.css index cb965158d..1c0f92d41 100644 --- a/src/app.css +++ b/src/app.css @@ -346,3 +346,49 @@ select { .tabular-nums { font-variant-numeric: tabular-nums; } + +/* ============ Action Buttons ============ */ +/* Reusable circular action buttons for headers and toolbars */ + +.action-btn-circle { + display: flex; + align-items: center; + justify-content: center; + width: 36px; + height: 36px; + border-radius: 50%; + border: 1px solid rgba(255, 255, 255, 0.3); + background: transparent; + color: var(--text-muted); + cursor: pointer; + transition: background 150ms ease, color 150ms ease, border-color 150ms ease; +} + +.action-btn-circle:hover:not(:disabled) { + background: var(--bg-hover); + color: var(--text-primary); + border-color: var(--text-primary); +} + +.action-btn-circle:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.action-btn-circle.primary { + width: 44px; + height: 44px; + background: var(--accent-primary); + border: 2px solid var(--text-primary); + color: var(--text-primary); +} + +.action-btn-circle.primary:hover { + background: var(--accent-hover); +} + +.action-btn-circle.is-active { + background: rgba(var(--accent-primary-rgb, 66, 133, 244), 0.15); + border-color: var(--accent-primary); + color: var(--accent-primary); +} diff --git a/src/lib/components/views/AlbumDetailView.svelte b/src/lib/components/views/AlbumDetailView.svelte index f127f51a4..3e0aa4781 100644 --- a/src/lib/components/views/AlbumDetailView.svelte +++ b/src/lib/components/views/AlbumDetailView.svelte @@ -215,22 +215,22 @@