Repository navigation
fix(markdown): keep bold text in the callout color - #520
Merged
Merged
Conversation
Inside a callout, **bold** took the typography styles' ink color (near black, white in dark mode) instead of the color token of the callout type, because `.prose strong` sets its own color over the inherited one. The callout body now carries the mdx-callout-content class, and bold in it inherits the callout color and stands out by weight instead, raised from prose's 600 to 700.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Mode: standard. This run covered the whole PR: a scoped CSS override that stops .prose from repainting bold text inside callouts. Verdict: READY.
- Callout content hook:
Callout.tsxgives the content<div>anmdx-callout-contentclass and keeps the inlinecolor: token.content. Every callout type and GFM alert uses this element, becauseregistry/index.tsbuilds them all throughcallout(type)→Callout. - Bold override:
styles.cssadds.mdx-callout-content :is(strong, b) { color: inherit; font-weight: 700 }. Typography's selector is.prose :where(strong):not(:where(...))with specificity (0,1,0). The new rule has (0,1,1) and sits outside any layer, so it wins as the PR describes. - Regression test + changeset: The test checks the class and the rule text through
styles.css?raw, the same wayCodeBlockBleed/MermaidMdxtests do. A@docubook/markdownpatch changeset is included.
I ran npx vitest run src/__test__/Callout.test.tsx (7 passed) and tsc -p tsconfig.json --noEmit (clean) locally.
claude-opus-5-5 | 𝕏
This was referenced Nov 10, 2026
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
Inside a callout,
**bold**ignored the callout type's color token. Docs content sits in Tailwind Typography's.prose, which givesstrongits own color (--tw-prose-bold: near black in light mode, white in dark mode). That color replaced the callout color the bold text should inherit, so it showed as an ink-colored word on a tinted panel.Fix
Callout.tsx: the callout body gets themdx-callout-contentclass next to its existing inlinecolor: token.content.styles.css:.mdx-callout-content :is(strong, b)setscolor: inheritandfont-weight: 700. Bold keeps the callout color and stands out by weight instead, one step above prose's 600. The selector outranks.prose :where(strong), and the rule covers every callout type, GFM alerts included.@docubook/markdown.Verification
Measured in Chromium on the
infocallout of/docs/getting-started/search/algolia(built docs, computed styles):oklch(0.22 0.03 260)rgba(52, 143, 234, 0.75)rgb(255, 255, 255)rgba(87, 171, 255, 0.75)rgba(52, 143, 234, 0.75)rgba(52, 143, 234, 0.75)rgba(87, 171, 255, 0.75)rgba(87, 171, 255, 0.75)The
@docubook/markdowntests (148) pass, and typecheck and prettier are clean.