fix(readers): create reader-specific chrome colours (#1493)

This commit is contained in:
Alex
2026-05-26 20:44:45 +01:00
committed by GitHub
parent ee9c24333d
commit 7a3a3bad4b
22 changed files with 736 additions and 865 deletions
@@ -1,14 +1,4 @@
// Variables matching sidebar styling
$dialog-bg: #1a1a1a;
$text-primary: rgb(255 255 255 / 95%);
$text-secondary: rgb(255 255 255 / 60%);
$text-muted: rgb(255 255 255 / 40%);
$border-color: rgb(255 255 255 / 8%);
$hover-bg: rgb(255 255 255 / 8%);
$active-color: #818cf8;
$active-bg: rgb(129 140 248 / 15%);
$transition-fast: 150ms ease;
$transition-normal: 200ms ease;
@use '../../shared/styles/reader-chrome' as *;
.dialog-overlay {
position: fixed;
@@ -19,7 +9,7 @@ $transition-normal: 200ms ease;
display: flex;
align-items: center;
justify-content: center;
animation: fade-in $transition-normal;
animation: fade-in var(--transition-base);
}
@keyframes fade-in {
@@ -28,8 +18,9 @@ $transition-normal: 200ms ease;
}
.dialog {
background: $dialog-bg;
border: 1px solid $border-color;
@include surface;
border: 1px solid var(--reader-chrome-border);
border-radius: 12px;
width: 90%;
max-width: 800px;
@@ -61,17 +52,16 @@ $transition-normal: 200ms ease;
.dialog-header {
padding: 16px 20px;
border-bottom: 1px solid $border-color;
border-bottom: 1px solid var(--reader-chrome-border);
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(180deg, rgb(255 255 255 / 2%) 0%, transparent 100%);
background: linear-gradient(180deg, color-mix(in srgb, var(--color-white) 2%, transparent) 0%, transparent 100%);
h2 {
margin: 0;
font-size: 16px;
font-weight: 600;
color: $text-primary;
letter-spacing: -0.3px;
}
}
@@ -79,12 +69,12 @@ $transition-normal: 200ms ease;
.close-btn {
background: none;
border: none;
color: $text-muted;
color: var(--reader-chrome-fg-muted);
font-size: 18px;
cursor: pointer;
padding: 6px;
border-radius: 6px;
transition: background $transition-fast, color $transition-fast;
transition: background var(--transition-fast), color var(--transition-fast);
line-height: 1;
width: 32px;
height: 32px;
@@ -93,12 +83,12 @@ $transition-normal: 200ms ease;
justify-content: center;
&:hover {
background: $hover-bg;
color: $text-primary;
background: var(--reader-chrome-hover);
color: var(--color-white);
}
&:focus-visible {
outline: 2px solid $active-color;
outline: 2px solid var(--reader-chrome-accent);
outline-offset: 2px;
}
}
@@ -151,8 +141,8 @@ $transition-normal: 200ms ease;
.cover-placeholder {
width: 100%;
aspect-ratio: 2/3;
background: linear-gradient(135deg, rgb(255 255 255 / 4%) 0%, rgb(255 255 255 / 1%) 100%);
border: 2px dashed rgb(255 255 255 / 12%);
background: linear-gradient(135deg, color-mix(in srgb, var(--color-white) 4%, transparent) 0%, color-mix(in srgb, var(--color-white) 1%, transparent) 100%);
border: 2px dashed color-mix(in srgb, var(--color-white) 12%, transparent);
border-radius: 8px;
display: flex;
align-items: center;
@@ -173,16 +163,16 @@ $transition-normal: 200ms ease;
}
.metadata-group {
animation: fade-in $transition-normal;
animation: fade-in var(--transition-base);
&:not(:last-child) {
padding-bottom: 16px;
border-bottom: 1px solid $border-color;
border-bottom: 1px solid var(--reader-chrome-border);
}
}
.section-title {
color: $text-muted;
color: var(--reader-chrome-fg-muted);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
@@ -208,13 +198,13 @@ $transition-normal: 200ms ease;
}
.label {
color: $text-secondary;
color: var(--reader-chrome-fg-secondary);
font-size: 13px;
font-weight: 500;
}
.value {
color: $text-primary;
color: var(--color-white);
font-size: 13px;
overflow-wrap: anywhere;
line-height: 1.5;
@@ -222,15 +212,15 @@ $transition-normal: 200ms ease;
&.file-name {
font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', monospace;
font-size: 12px;
color: $text-secondary;
background: rgb(255 255 255 / 3%);
color: var(--reader-chrome-fg-secondary);
background: color-mix(in srgb, var(--color-white) 3%, transparent);
padding: 4px 8px;
border-radius: 4px;
}
}
.review-count {
color: $text-muted;
color: var(--reader-chrome-fg-muted);
font-size: 12px;
margin-left: 4px;
}
@@ -242,22 +232,22 @@ $transition-normal: 200ms ease;
}
.tag {
background: $active-bg;
color: $text-primary;
background: color-mix(in srgb, var(--reader-chrome-accent) 15%, transparent);
color: var(--color-white);
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
border: 1px solid rgb(129 140 248 / 20%);
transition: background $transition-fast;
border: 1px solid color-mix(in srgb, var(--reader-chrome-accent) 20%, transparent);
transition: background var(--transition-fast);
&:hover {
background: rgb(129 140 248 / 25%);
background: color-mix(in srgb, var(--reader-chrome-accent) 25%, transparent);
}
}
.description {
color: $text-secondary;
color: var(--reader-chrome-fg-secondary);
font-size: 13px;
line-height: 1.7;
margin: 0;