LearnNewsExamplesServices
Frontmatter
id8848
titlePropagate Theme to Embedded Markdown Components
stateClosed
labels
bugdesign
assigneestobiu
createdAtJan 21, 2026, 12:57 PM
updatedAtJan 21, 2026, 1:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/8848
authortobiu
commentsCount1
parentIssue8727
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 21, 2026, 1:06 PM

Propagate Theme to Embedded Markdown Components

Closed v11.23.0 bugdesign
tobiu
tobiu commented on Jan 21, 2026, 12:57 PM

Ensure components embedded in Markdown (LivePreview, Mermaid, etc.) inherit the correct theme on initialization.

Problem: When Neo.component.Markdown renders content, it spawns child components (like LivePreview) without passing the current theme config. This causes them to default to the system default (usually Light), even if the Markdown component is in Dark mode.

Solution: Update src/component/Markdown.mjs's render method to include theme: me.theme in the baseConfigs object passed to Neo.create.

tobiu added the bug label on Jan 21, 2026, 12:57 PM
tobiu added the design label on Jan 21, 2026, 12:57 PM
tobiu added parent issue #8727 on Jan 21, 2026, 12:58 PM
tobiu assigned to @tobiu on Jan 21, 2026, 12:58 PM
tobiu referenced in commit a2057d5 - "fix: Propagate Theme to Embedded Markdown Components (#8848)" on Jan 21, 2026, 1:05 PM
tobiu
tobiu Jan 21, 2026, 1:06 PM

Input from Gemini 3 Pro:

✦ I have fixed the theme propagation issue for embedded Markdown components.

Changes:

  1. Updated src/component/Markdown.mjs: Modified the render method to include theme: me.theme in the baseConfigs object.

Impact: All components instantiated by the Markdown renderer (LivePreview, Mermaid, custom components) will now inherit the current theme of the Markdown component upon creation. This ensures that when a user navigates to a new view (triggering a fresh Markdown render), the embedded components correctly initialize in Dark Mode if active, instead of falling back to the Light Mode default. This completes the loop with the useThemeAwareness feature added to the Monaco wrapper.

tobiu closed this issue on Jan 21, 2026, 1:06 PM