Skip to content

Conversation

@tgfjt
Copy link
Contributor

@tgfjt tgfjt commented Mar 7, 2025

…istent styling

Apply :has() selector to make code elements inherit font size from their heading parents. This ensures visual consistency in markdown headings containing code blocks.

Context

This PR fixes a styling issue where code elements within headings (h1-h6) were using a smaller font size compared to the rest of the heading text. The inconsistent sizing created a jarring visual experience when headings contained code blocks.

Implementation

  • Added a CSS rule using the :has() selector to make code elements inherit font size from their heading parents
  • Applied the fix to the StyledMarkdown component to ensure proper scoping

Screenshots

before after
image image

How to Test

Ask Roo: create a sample response from a Markdown block that includes a heading with code elements embedded within it

  • Verify that code elements within headings now maintain consistent sizing with the rest of the heading text
  • Confirm there are no unintended side effects on other code element styling

Get in Touch

tgfjt


Important

Adjusts font size of code elements within headings in StyledMarkdown to ensure consistent styling in markdown headings with code blocks.

  • Behavior:
    • Adjusts font size of code elements within headings (h1-h6) to inherit from parent heading using :has() selector in StyledMarkdown.
    • Ensures consistent styling for markdown headings with embedded code blocks.
  • Implementation:
    • Adds CSS rule in StyledMarkdown component in MarkdownBlock.tsx to apply the fix.

This description was created by Ellipsis for 1235db6. It will automatically update as commits are pushed.

…istent styling

Apply :has() selector to make code elements inherit font size from their heading parents.
This ensures visual consistency in markdown headings containing code blocks.
@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2025

⚠️ No Changeset found

Latest commit: 1235db6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 7, 2025
@dosubot dosubot bot added bug Something isn't working lgtm This PR has been approved by a maintainer labels Mar 7, 2025
@cte cte merged commit 2d87b86 into RooCodeInc:main Mar 7, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 7, 2025
@tgfjt tgfjt deleted the patch-1 branch March 7, 2025 11:03
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants