-
Notifications
You must be signed in to change notification settings - Fork 6
style: fix dark/light colors #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,18 @@ | |
| --brand-dark: rgb(18 152 141); | ||
| --brand-very-dark: rgb(14 116 107); | ||
| --brand-darkest: rgb(14 53 50); | ||
|
|
||
| --sidebar-foreground: var(--color-gray-600); | ||
|
|
||
| color-scheme: light; | ||
| } | ||
|
|
||
| .dark{ | ||
| --sidebar-foreground: rgb(255 255 255); | ||
| --sidebar-foreground: var(--color-gray-300); | ||
| /* Force light mode rendering */ | ||
|
|
||
| color-scheme: dark; | ||
| } | ||
|
Comment on lines
+18
to
24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainDuplicate assignment of --sidebar-foreground; second one overrides the first. Clarify intent and keep a single value. In
If white was intended, the current code never uses it. If gray-300 was intended, drop the first line. You can also use a CSS var fallback if you truly want “use gray-300 if defined, otherwise white”. Pick one of these: Option A (prefer gray-300): .dark{
- --sidebar-foreground: rgb(255 255 255);
- --sidebar-foreground: var(--color-gray-300);
+ --sidebar-foreground: var(--color-gray-300);
/* Force light mode rendering */
color-scheme: dark;
}Option B (prefer white with gray-300 fallback if token is missing): .dark{
- --sidebar-foreground: rgb(255 255 255);
- --sidebar-foreground: var(--color-gray-300);
+ --sidebar-foreground: var(--color-gray-300, rgb(255 255 255));
/* Force light mode rendering */
color-scheme: dark;
}Also, the comment “Force light mode rendering” inside the dark block is misleading. Consider updating it: - /* Force light mode rendering */
+ /* Advertise dark color scheme to the UA */Please sanity-check contrast of 🏁 Script executed: #!/bin/bash
# Locate the `.dark` rule in src/tailwind.css and show its contents with surrounding context
rg -nP '\.dark\s*\{' -C5 src/tailwind.cssLength of output: 306 Remove or consolidate the duplicate The .dark {
--sidebar-foreground: rgb(255 255 255);
--sidebar-foreground: var(--color-gray-300);
/* Force light mode rendering */
color-scheme: dark;
}The second declaration immediately overrides the first—so white is never used. Decide which token you actually need, or combine them via a fallback. Also update the misleading comment inside a dark‐mode block. Locations to update:
Suggested fixes (pick one): Option A: Prefer gray-300 .dark {
- --sidebar-foreground: rgb(255 255 255);
- --sidebar-foreground: var(--color-gray-300);
+ --sidebar-foreground: var(--color-gray-300);
/* Advertise dark color scheme to the UA */
color-scheme: dark;
}Option B: Prefer white, fall back to gray-300 .dark {
- --sidebar-foreground: rgb(255 255 255);
- --sidebar-foreground: var(--color-gray-300);
+ --sidebar-foreground: var(--color-gray-300, rgb(255 255 255));
/* Advertise dark color scheme to the UA */
color-scheme: dark;
}• Replace the comment 🤖 Prompt for AI Agents |
||
|
|
||
| @theme{ | ||
|
|
@@ -19,6 +31,8 @@ | |
| --color-brand-light: var(--brand-light); | ||
| --color-brand-very-light: var(--brand-very-light); | ||
|
|
||
| --color-sidebar-foreground: var(--sidebar-foreground); | ||
|
|
||
| --animate-fade-in: fade-in 0.75s ease-in forwards; | ||
|
|
||
| @keyframes fade-in { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid hard-coding the page background; keep it themable.
Replacing
var(--sidebar)with#101010makes the PDF page background non-configurable and may diverge from light/gray modes or future themes. Prefer a semantic token with a safe fallback.Apply:
Then define the token (outside this hunk) to preserve dark/light behavior. For example, in your theme stylesheet:
Alternatively, if
var(--sidebar)was the intended source of truth, consider reverting to it to keep behavior aligned with the rest of the app theme.I can wire this token into
@themeas--color-page-bgto getbg-page-bgutilities if you prefer Tailwind-first usage.🤖 Prompt for AI Agents