feat(settings,reports): six ayanamsa options; report-scope solid button colours (T6/T7, BUG-1078)
T6: offer True Citra and Fagan-Bradley beside Raman/Lahiri/KP/True Pushya,
engine-supported values only; widen profiles_ayanamsa_check by an additive
migration; ephemeris note names; path tests so no new value falls back to
Raman.
T7: the unlayered `button { color: inherit; }` beats Tailwind's
text-primary-foreground, so solid report buttons showed page ink (light
(light 4.85:1, dark 5.77:1), grey disabled without fade, neutral selected
preset. button.tsx and theme tokens unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
856dab6c55
commit
873fac8a5b
@@ -3979,7 +3979,10 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
|
||||
.report-export-header p { margin: var(--space-2) 0; font-size: var(--type-body-sm); color: var(--color-ink-secondary); }
|
||||
.report-export-count { font-variant-numeric: tabular-nums; }
|
||||
.report-export-presets { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.report-export-presets [aria-pressed="true"] { background: var(--color-action-soft); color: var(--color-action); }
|
||||
/* Selected preset: neutral raised fill + full ink + a visible edge. The old
|
||||
--color-action-soft fill reads as a dark red-brown block in the dark theme
|
||||
(#3a2620) — BUG-1078. */
|
||||
.report-export-presets [aria-pressed="true"] { background: var(--color-canvas-muted); color: var(--color-ink); border-color: var(--color-ink-secondary); }
|
||||
.report-export-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 var(--space-4) var(--space-4); }
|
||||
.report-export-list h3 { font-size: var(--type-title-sm); margin: var(--space-3) 0 var(--space-2); }
|
||||
.report-export-grid { display: grid; gap: var(--space-2); }
|
||||
@@ -3995,6 +3998,59 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
|
||||
@media (min-width: 860px) { .report-export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
||||
@media print { .report-export-drawer { display: none !important; } }
|
||||
|
||||
/* ── 我的报告 buttons (BUG-1078) ────────────────────────────────────────────
|
||||
Scoped to the report surfaces only: the list (`.report-center-*`), the
|
||||
reader and its export drawer (`.personal-report-reader`), and the
|
||||
state / error / not-found / loading screens (`.personal-report-state`).
|
||||
The global tokens and components/ui/button.tsx stay as they are; other
|
||||
pages keep the shared primary button (product decision 2026-09-28).
|
||||
Why the shared solid button looked wrong: the unlayered `button { color:
|
||||
inherit; }` near the top of this sheet beats Tailwind's layered
|
||||
`text-primary-foreground`, so a solid <button> renders in the inherited ink —
|
||||
#1d1d1f on #a9583e in the light theme (3.33:1, the reported 「黑字深红底」)
|
||||
and #f2f0ea on #d78064 in the dark theme (2.57:1). The unlayered
|
||||
`button:disabled { opacity: .45 }` then fades the whole thing.
|
||||
- Solid (`variant="default"`): light = #fbfaf7 on #a9583e (4.85:1);
|
||||
dark = --color-ink #f2f0ea on --color-action-on-dark #8f4a33 (5.77:1),
|
||||
hover mixes 6% ink in (5.1:1).
|
||||
- Disabled, any variant: a neutral grey fill with tertiary ink, opacity 1.
|
||||
The solid variant is matched as `[class~="bg-primary"]`, not `.bg-primary`:
|
||||
this sheet does not define Tailwind utilities, and class-name-definition-
|
||||
contract reads every `.name` here as one of our own class families. */
|
||||
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) {
|
||||
--report-button-fill: var(--color-action);
|
||||
/* Same as the shared `hover:bg-primary/80`, so the light theme is unchanged. */
|
||||
--report-button-fill-hover: color-mix(in srgb, var(--color-action) 80%, transparent);
|
||||
--report-button-ink: var(--color-on-dark);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) :is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) {
|
||||
--report-button-fill: var(--color-action-on-dark);
|
||||
--report-button-fill-hover: color-mix(in srgb, var(--color-action-on-dark) 94%, var(--color-ink));
|
||||
--report-button-ink: var(--color-ink);
|
||||
}
|
||||
}
|
||||
:root[data-theme="dark"] :is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) {
|
||||
--report-button-fill: var(--color-action-on-dark);
|
||||
--report-button-fill-hover: color-mix(in srgb, var(--color-action-on-dark) 94%, var(--color-ink));
|
||||
--report-button-ink: var(--color-ink);
|
||||
}
|
||||
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) [data-slot="button"][class~="bg-primary"] {
|
||||
background: var(--report-button-fill);
|
||||
color: var(--report-button-ink);
|
||||
}
|
||||
@media (hover: hover) {
|
||||
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) [data-slot="button"][class~="bg-primary"]:not(:disabled):hover {
|
||||
background: var(--report-button-fill-hover);
|
||||
}
|
||||
}
|
||||
:is(.report-center-message, .report-center-body, .personal-report-state, .personal-report-reader) [data-slot="button"]:disabled {
|
||||
opacity: 1;
|
||||
border-color: transparent;
|
||||
background: var(--color-canvas-strong);
|
||||
color: var(--color-ink-tertiary);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
personal-report: unique block — editorial reader + A4 print
|
||||
Only /reports/[reportId] uses these semantic classes. The report owns its
|
||||
|
||||
Reference in New Issue
Block a user