Skip to content

Fix inline code font size in headings - #48

Merged
rezrah merged 1 commit into
mainfrom
rezrah/fix-inline-code
Jun 24, 2025
Merged

Fix inline code font size in headings#48
rezrah merged 1 commit into
mainfrom
rezrah/fix-inline-code

Conversation

@rezrah

@rezrah rezrah commented Jun 24, 2025

Copy link
Copy Markdown
Collaborator
Before After

Screenshot 2025-06-24 at 17 57 24

Screenshot 2025-06-24 at 17 57 28

Before After

Screenshot 2025-06-24 at 17 56 55

Screenshot 2025-06-24 at 17 57 00

Copilot AI review requested due to automatic review settings June 24, 2025 17:33
@rezrah
rezrah requested a review from a team as a code owner June 24, 2025 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 the font size of inline code inside headings and adjusts spacing under React code blocks, along with updating an example and the changeset.

  • Add CSS rule so inline <code> in headings inherits heading font size
  • Define --spacing custom property for code blocks and update spacing in example
  • Update example MDX and changelog entry

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/theme/css/prose.module.css New rule to make inline code in headings inherit font-size
packages/theme/components/layout/code-block/ReactCodeBlock.module.css Added --spacing custom property for code block spacing
packages/site/content/content-example/kitchen-sink.mdx Added demo heading with inline code
.changeset/khaki-mugs-cover.md Updated changelog to reflect CSS and spacing fixes
Comments suppressed due to low confidence (1)

packages/theme/css/prose.module.css:215

  • [nitpick] Consider adding a visual or snapshot test to verify that inline code within headings correctly inherits the heading font size across supported browsers.
.Prose :is(h1, h2, h3, h4, h5, h6):has(code) code:not(:global(.custom-component) code) {

@rezrah
rezrah merged commit ce73c24 into main Jun 24, 2025
8 checks passed
@primer-css primer-css mentioned this pull request Jun 24, 2025
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.

2 participants