Conversation
The hard-coded dark code block background (#1f2937 / #292524) combined
with `.prose` rules was producing near-black text in the light theme:
`.prose pre` forced color #D6D3D1 and
`.prose code:not(.md-code-block__code):not(.md-inline-code)` pulled the
code element back to var(--foreground), overriding the Tailwind classes
on the fallback <pre>/<code>.
Add a higher-specificity rule on .md-renderer .md-code-block {,pre,code}
that pins the text color to #e5e7eb regardless of theme, and tag the
<code> elements in the Rich/Simple markdown fallbacks with the existing
md-code-block__code class so the :not() guard kicks in and inheritance
resolves to the light color.
Collaborator
|
Thanks for your contribution! |
pancacake
pushed a commit
that referenced
this pull request
Apr 20, 2026
…via agents.yaml (#348) Rebased onto latest dev (post-#352) to pull in the lazy loguru import in `deeptutor/tutorbot/channels/manager.py`, which was the root cause of the smoke-test failures (unrelated to this PR's own diff). Merging: adds per-stage `max_tokens` and `temperature` knobs under `capabilities.chat` in `agents.yaml`, bumps the `responding`/`answer_now` defaults from 1800 → 8000 to fix mid-sentence truncation on long answers, and keeps safe fallbacks in `_ChatLimits.from_config` for legacy configs. 10 new unit tests covering loader resolution and dataclass coercion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the light theme, multi-line code blocks rendered by the chat showed near-black text on the hard-coded dark background (
#1f2937/#292524), making the content unreadable.Two issues compounded it:
.prose pre { color: #D6D3D1 }overrode the Tailwindtext-[#e5e7eb]class on the<pre>(higher specificity)..prose code:not(.md-code-block__code):not(.md-inline-code) { color: var(--foreground) }matched the fallback<code>(nomd-code-block__codeclass) and pulled it back tovar(--foreground)(#1F1D1Bin the light theme).The fix:
.md-renderer .md-code-block { ,pre,code } { color: #e5e7eb }inweb/app/globals.css(specificity 0,2,1) so the dark code block always shows light text regardless of theme. Doesn't affect PrismoneDarksyntax highlighting (token colors are inline on<span>).<code>element in the multi-line fallbacks ofRichMarkdownRendererandSimpleMarkdownRendererwith the existingmd-code-block__codeclass so the:not(.md-code-block__code)guard kicks in and the existingcolor: inherit !importantchain resolves to the new light color.Inline code (
.md-inline-code) is untouched and keeps theming viavar(--foreground)/var(--muted).Test plan
#e5e7eb) and readable.python ```) still gets PrismoneDarksyntax highlighting with proper token colors.