refactor(theme): centralize global theme styles

cx
This commit is contained in:
vicrodh committed 2026-01-19 11:43:14 -06:00
1 parent 395fd165d4
commit 05780f2b13
2 files changed
+63 -189

No files matched your search

+63 -28
View File
@@ -19,6 +19,10 @@
--border-subtle: #2a2a2a;
--border-strong: #3a3a3a;
/* Layout */
--sidebar-width: 240px;
--now-playing-height: 80px;
/* Spacing System */
--spacing-micro: 4px;
--spacing-tight: 8px;
@@ -33,24 +37,20 @@
--font-mono: 'JetBrains Mono', monospace;
}
/* Light Theme (Alucard - soft cream tones inspired by Dracula inverted) */
/* Light Theme */
[data-theme="light"] {
--bg-primary: #F8F8F2;
--bg-secondary: #EEF0F5;
--bg-tertiary: #E2E5EB;
--bg-hover: #D8DCE5;
--bg-primary: #ffffff;
--bg-secondary: #f5f5f5;
--bg-tertiary: #e8e8e8;
--bg-hover: #f0f0f0;
--text-primary: #282A36;
--text-secondary: #44475A;
--text-muted: #6272A4;
--text-disabled: #9CA3C0;
--text-primary: #0f0f0f;
--text-secondary: #444444;
--text-muted: #666666;
--text-disabled: #999999;
--accent-primary: #8B5CF6;
--accent-hover: #7C3AED;
--accent-active: #6D28D9;
--border-subtle: #D8DCE5;
--border-strong: #C8CCD5;
--border-subtle: #e0e0e0;
--border-strong: #cccccc;
}
/* OLED Theme */
@@ -63,14 +63,14 @@
/* Warm Theme */
[data-theme="warm"] {
--bg-primary: #1a1512;
--bg-secondary: #231d18;
--bg-tertiary: #2d2520;
--bg-hover: #28211c;
--bg-primary: #1a1814;
--bg-secondary: #242018;
--bg-tertiary: #2e2820;
--bg-hover: #282218;
--accent-primary: #e89b5a;
--accent-hover: #f0ab6e;
--accent-active: #d88b4a;
--accent-primary: #d4a574;
--accent-hover: #e0b888;
--accent-active: #c49460;
}
* {
@@ -81,34 +81,69 @@
html {
font-size: 16px;
height: 100%;
width: 100%;
overflow: hidden;
}
body {
font-family: var(--font-sans);
font-size: 14px;
line-height: 1.5;
background-color: var(--bg-primary);
color: var(--text-primary);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
overflow: hidden;
}
/* Scrollbar Styling */
::-webkit-scrollbar {
width: 12px;
height: 12px;
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-secondary);
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 6px;
border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--border-strong);
background: var(--text-muted);
}
::selection {
background-color: var(--accent-primary);
color: var(--text-primary);
}
:focus-visible {
outline: 2px solid var(--accent-primary);
outline-offset: 2px;
}
button {
background: none;
border: none;
cursor: pointer;
font: inherit;
color: inherit;
}
a {
color: inherit;
text-decoration: none;
}
input,
textarea,
select {
font: inherit;
color: inherit;
}
/* Hide scrollbar for horizontal scroll containers */
-161
View File
@@ -23,115 +23,6 @@
{/if}
<style>
:global(*) {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:global(html, body) {
height: 100%;
width: 100%;
overflow: hidden;
}
:global(body) {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
font-size: 14px;
line-height: 1.5;
color: var(--text-primary);
background-color: var(--bg-primary);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* CSS Variables - Dark Theme (Default) */
:global(:root) {
/* Backgrounds */
--bg-primary: #0f0f0f;
--bg-secondary: #1a1a1a;
--bg-tertiary: #2a2a2a;
--bg-hover: #1f1f1f;
/* Text */
--text-primary: #ffffff;
--text-secondary: #cccccc;
--text-muted: #888888;
--text-disabled: #555555;
/* Accent */
--accent-primary: #4285F4;
--accent-hover: #5a9bf4;
--accent-active: #3275e4;
/* Borders */
--border-subtle: #2a2a2a;
--border-strong: #3a3a3a;
/* Shadows */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
/* Spacing */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 12px;
--spacing-lg: 16px;
--spacing-xl: 24px;
--spacing-2xl: 32px;
--spacing-3xl: 48px;
/* Layout */
--sidebar-width: 240px;
--now-playing-height: 80px;
/* Border Radius */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 16px;
--radius-full: 9999px;
/* Transitions */
--transition-fast: 150ms ease-out;
--transition-normal: 200ms ease-out;
--transition-slow: 300ms ease-out;
}
/* Light Theme */
:global([data-theme="light"]) {
--bg-primary: #ffffff;
--bg-secondary: #f5f5f5;
--bg-tertiary: #e8e8e8;
--bg-hover: #f0f0f0;
--text-primary: #0f0f0f;
--text-secondary: #444444;
--text-muted: #666666;
--text-disabled: #999999;
--border-subtle: #e0e0e0;
--border-strong: #cccccc;
}
/* OLED Black Theme */
:global([data-theme="oled"]) {
--bg-primary: #000000;
--bg-secondary: #0a0a0a;
--bg-tertiary: #1a1a1a;
--bg-hover: #111111;
}
/* Warm Theme */
:global([data-theme="warm"]) {
--bg-primary: #1a1814;
--bg-secondary: #242018;
--bg-tertiary: #2e2820;
--bg-hover: #282218;
--accent-primary: #d4a574;
--accent-hover: #e0b888;
--accent-active: #c49460;
}
.loading {
display: flex;
align-items: center;
@@ -154,56 +45,4 @@
transform: rotate(360deg);
}
}
/* Scrollbar styling */
:global(::-webkit-scrollbar) {
width: 8px;
height: 8px;
}
:global(::-webkit-scrollbar-track) {
background: transparent;
}
:global(::-webkit-scrollbar-thumb) {
background: var(--bg-tertiary);
border-radius: var(--radius-full);
}
:global(::-webkit-scrollbar-thumb:hover) {
background: var(--text-muted);
}
/* Selection */
:global(::selection) {
background-color: var(--accent-primary);
color: var(--text-primary);
}
/* Focus visible */
:global(:focus-visible) {
outline: 2px solid var(--accent-primary);
outline-offset: 2px;
}
/* Button reset */
:global(button) {
background: none;
border: none;
cursor: pointer;
font: inherit;
color: inherit;
}
/* Link reset */
:global(a) {
color: inherit;
text-decoration: none;
}
/* Input reset */
:global(input, textarea, select) {
font: inherit;
color: inherit;
}
</style>