Skip to content

Conversation

@SoonIter
Copy link
Member

@SoonIter SoonIter commented Jan 12, 2026

Summary

Related Issue

closes #2996

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

AI Summary


What changed

Fixed the inline code styling in Callout components by changing the CSS selector from :not(pre, div) > code to :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) > code would not match it because the parent element is a div. 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:

:::warning
`docker 29`之后...
:::

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:

:not(pre, div) > code { ... }

to:

:not(pre) > code { ... }

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


Copilot AI review requested due to automatic review settings January 12, 2026 12:53
@netlify
Copy link

netlify bot commented Jan 12, 2026

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 9ebd70c
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/6964f1695414d70008d3caf5
😎 Deploy Preview https://deploy-preview-2997--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title 修复 Callout 的样式 (vibe-kanban) fix(theme): fix inline code style in Callout when code is direct child of content Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a styling issue in the Callout component where inline code elements were not receiving proper color styling when they appeared as direct children of the .rp-callout__content div element. The fix removes div from the CSS :not() selector to allow inline code styling to apply correctly.

Changes:

  • Updated CSS selector from :not(pre, div) > code to :not(pre) > code across all callout variants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
node 9.8 MB 0
node_md 1.3 MB 0
web 15.6 MB -4.0 KB (-0.0%)
📋 Detailed Reports (Click to expand)

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 82a242261a | PR: #2994

Metric Current Baseline Change
📊 Total Size 15.6 MB 15.6 MB -4.0 KB (-0.0%)
📄 JavaScript 14.9 MB 14.9 MB 0
🎨 CSS 126.3 KB 130.2 KB -4.0 KB (-3.0%)
🌐 HTML 0 B 0 B 0
📁 Other Assets 578.2 KB 578.2 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter requested a review from Timeless0911 January 13, 2026 03:22
@SoonIter SoonIter merged commit 3b26efc into main Jan 13, 2026
8 checks passed
@SoonIter SoonIter deleted the syt_vk/2338-callout branch January 13, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Style problems in Container

3 participants