Skip to content

fix(blog): use landing theme variables in MDX components#3900

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/blog-style
Apr 2, 2026
Merged

fix(blog): use landing theme variables in MDX components#3900
waleedlatif1 merged 1 commit intostagingfrom
fix/blog-style

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Fixed inline code blocks on blog posts rendering with a near-white background (--surface-4) instead of the dark landing theme background — this caused text to be invisible
  • Fixed p, ul, and ol MDX components using workspace theme variable --text-subtle instead of the landing theme variable --landing-text-muted

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 2, 2026 7:16pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Low Risk
Low risk styling-only change: swaps CSS variables for blog MDX text and inline code backgrounds, with no logic or data-flow impact.

Overview
Blog MDX rendering now consistently uses the landing theme color variables: paragraph/list text switches from --text-subtle to --landing-text-muted, and inline code background switches from --surface-4 to --landing-bg-elevated to avoid low-contrast code on dark pages.

Written by Cursor Bugbot for commit c9d7732. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR fixes a theming bug in the blog's MDX component definitions where workspace-scoped CSS variables were being used in the landing-page context. The blog lives under the landing theme, so --text-subtle and --surface-4 resolved to workspace values (a near-white background for inline code, and wrong text muted colour for paragraphs and lists), making content invisible or incorrectly styled.

Changes:

  • p, ul, ol: --text-subtle--landing-text-muted
  • Inline code background: --surface-4--landing-bg-elevated

The fix is minimal, well-scoped, and consistent with the rest of the file, which already used --landing-text and --landing-bg-elevated on other elements (h2h4, strong, a, hr).

Confidence Score: 5/5

Safe to merge — targeted, correct theming fix with no logic changes or regressions.

All four changed lines are straightforward CSS variable substitutions that align the blog MDX components with the existing landing-theme pattern already used throughout the same file. No logic, data flow, or API surface is affected. No new issues introduced.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/lib/blog/mdx.tsx Fixes CSS variable mismatches in MDX components — swaps workspace theme vars (--text-subtle, --surface-4) for landing theme vars (--landing-text-muted, --landing-bg-elevated) on p, ul, ol, and inline code elements.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[MDX Content] --> B{Element type?}
    B -->|h2 / h3 / h4 / strong / a| C["--landing-text (unchanged)"]
    B -->|p / ul / ol| D["--landing-text-muted (was --text-subtle)"]
    B -->|inline code| E["bg: --landing-bg-elevated (was --surface-4)"]
    B -->|fenced code block| F[CodeBlock component]
    B -->|hr| G["border: --landing-bg-elevated (unchanged)"]
Loading

Reviews (1): Last reviewed commit: "fix(blog): use landing theme variables i..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit e2e29ce into staging Apr 2, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/blog-style branch April 2, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant