Skip to content

[fix] Render markdown headings by level instead of uppercasing#4548

Merged
bekossy merged 1 commit into
release/v0.102.0from
fix/markdown-heading-styles
Jun 5, 2026
Merged

[fix] Render markdown headings by level instead of uppercasing#4548
bekossy merged 1 commit into
release/v0.102.0from
fix/markdown-heading-styles

Conversation

@mmabrouk
Copy link
Copy Markdown
Member

@mmabrouk mmabrouk commented Jun 4, 2026

Context

In the playground and the beautified markdown view, every ## Heading you typed rendered in all caps. The Lexical editor theme applied text-transform: uppercase to H2, so it rewrote your own prompt text. H1 also rendered lighter than H2, and H3 to H6 had no styling and fell back to browser defaults, so the heading hierarchy looked inconsistent.

Changes

Replaced the H1/H2-only rules in web/oss/src/styles/editor-theme.css with one shared rule for H1 to H6 (same color, weight 600, spacing, line-height) plus a descending size scale. Removed the uppercase transform. Extended the dark-mode override to cover all six levels so the new explicit colors do not render dark-on-dark.

Before: ## Some Heading showed as SOME HEADING.
After: it shows as Some Heading, sized by its level.

Size scale: H1 24px, H2 20px, H3 17px, H4 15px, H5 14px, H6 13px (muted).
CleanShot 2026-06-04 at 19 22 14@2x

CleanShot 2026-06-04 at 19 22 30@2x

The beautified/markdown view forced H2 headings to uppercase via
text-transform, rewriting the user's own prompt text. H1 was also lighter
than H2, and H3-H6 had no styling. Apply a consistent best-practice scale
(descending sizes, shared weight/color/spacing) across H1-H6 in both light
and dark mode, with no case transform.
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 4, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 4, 2026 5:19pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR consolidates repetitive CSS rules for editor headings across light and dark theme contexts. Light-theme heading styles are grouped into a unified selector with common properties while preserving per-heading font sizes. Dark-theme heading overrides are similarly consolidated for h1h5 to reduce rule duplication.

Changes

Editor Heading Styles Consolidation

Layer / File(s) Summary
Light-theme heading consolidation
web/oss/src/styles/editor-theme.css
.editor-heading-h1.editor-heading-h6 rules consolidated into a grouped selector with unified color, font weight, margins, padding, and line-height. Per-heading font-size rules retained; h6 receives a specific color while other headings share a common value.
Dark-theme heading consolidation
web/oss/src/styles/editor-theme.css
.dark .editor-heading-h1.dark .editor-heading-h5 rules grouped into a single selector applying uniform dark-mode text color, eliminating individual rule duplication.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing markdown heading rendering by removing the uppercase transform and applying level-based styling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly explains the context (headings were rendering in uppercase), the changes made (unified H1-H6 styling with size scale), and the expected outcome (headings now preserve casing and hierarchy).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/markdown-heading-styles

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-06-05T10:43:08.329Z

@bekossy bekossy changed the base branch from main to release/v0.102.0 June 5, 2026 10:13
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 5, 2026
@bekossy bekossy merged commit dbedb44 into release/v0.102.0 Jun 5, 2026
47 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants