Skip to content

feat(code): visual refresh of inline code#11610

Open
jd wants to merge 1 commit into
mainfrom
devs/jd/feat/inline-code-refresh/visual-refresh-inline-code--6c9be75b
Open

feat(code): visual refresh of inline code#11610
jd wants to merge 1 commit into
mainfrom
devs/jd/feat/inline-code-refresh/visual-refresh-inline-code--6c9be75b

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented May 20, 2026

Replace the inline <code> styling that pre-dated Pass A:

  • Add horizontal padding (0.4em) so the bg no longer sits flush
    against the glyphs
  • Add a 1px --theme-divider border so the chip has a defined edge
    against prose
  • Lift border-radius 3px → 4px (matches Pass A's small-element
    convention)
  • Drop the negative-margin hack: with real padding, it's no longer
    needed to keep the bg from stretching line-height
  • Inline the 0.2rem value into a > code's text-underline-offset
    (was passed via a custom prop on the generic code rule)

pre > code (block code via Expressive Code) explicitly resets the
new border and radius since the Expressive Code frame already owns
that visual.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Replace the inline `<code>` styling that pre-dated Pass A:

- Add horizontal padding (0.4em) so the bg no longer sits flush
  against the glyphs
- Add a 1px --theme-divider border so the chip has a defined edge
  against prose
- Lift border-radius 3px → 4px (matches Pass A's small-element
  convention)
- Drop the negative-margin hack: with real padding, it's no longer
  needed to keep the bg from stretching line-height
- Inline the 0.2rem value into `a > code`'s text-underline-offset
  (was passed via a custom prop on the generic `code` rule)

`pre > code` (block code via Expressive Code) explicitly resets the
new border and radius since the Expressive Code frame already owns
that visual.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I6c9be75b7c04d47a76d3d7718129e8f125dcee95
Copilot AI review requested due to automatic review settings May 20, 2026 11:43
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 20, 2026 11:43 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 20, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
  • #review-threads-unresolved = 0
This rule is failing.
  • #review-requested = 0
  • #review-threads-unresolved = 0
  • #changes-requested-reviews-by = 0

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team May 20, 2026 11:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Visual refresh for inline <code> styling in the docs theme, shifting from legacy “flush background” styling to a padded, bordered chip-like appearance while keeping block code styling owned by <pre>.

Changes:

  • Inline a > code underline offset value and remove shared --padding-block/--border-radius custom props from the generic code rule.
  • Move inline-only visuals (padding/border/radius) into the inline-code selector :not(pre) > code:not([class*="language"]).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/styles/index.css
Comment on lines 829 to +833
/* Inline code */
:not(pre) > code:not([class*="language"]) {
background: var(--theme-code-inline-bg);
padding: 0.15rem 0.4rem;
border: 1px solid var(--theme-border);
padding: 0.1em 0.4em;
Comment thread src/styles/index.css
Comment on lines 831 to +834
background: var(--theme-code-inline-bg);
padding: 0.15rem 0.4rem;
border: 1px solid var(--theme-border);
padding: 0.1em 0.4em;
border-radius: 4px;
@jd jd marked this pull request as ready for review May 20, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants