fix(theme): fix inline code style in Callout when code is direct child of content #2997
+9
−6
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
Related Issue
closes #2996
Checklist
AI Summary
What changed
Fixed the inline code styling in Callout components by changing the CSS selector from
:not(pre, div) > codeto:not(pre) > code.Why
When a
<code>element is a direct child of.rp-callout__content(which is a<div>), the original selector:not(pre, div) > codewould not match it because the parent element is adiv. This caused inline code to display with incorrect colors when it appeared as the first element in a Callout container.For example, in markdown like:
The inline code at the beginning of the line would not receive the proper Callout theme colors.
Implementation details
Changed the inline code selector in all 6 Callout types (note, tip, info, warning, caution/danger, details) from:
to:
This ensures that inline
<code>elements receive proper styling regardless of whether they are inside a<p>tag or directly under.rp-callout__content. The:not(pre)still correctly excludes code blocks (which are wrapped in<pre>tags).This PR was written using Vibe Kanban