Skip to content

fix: add overflow hidden to code group containers for corner radius clipping#205

Open
patcapulong wants to merge 1 commit intomainfrom
fix/code-group-corner-radius
Open

fix: add overflow hidden to code group containers for corner radius clipping#205
patcapulong wants to merge 1 commit intomainfrom
fix/code-group-corner-radius

Conversation

@patcapulong
Copy link
Contributor

@patcapulong patcapulong commented Feb 18, 2026

Summary

  • Adds overflow: hidden !important to the general .code-group, [data-testid="code-group-select"] CSS rule in mintlify/style.css
  • Fixes sharp corners and border clipping on API reference code blocks in production, where Mintlify's Tailwind overflow-hidden class is no longer being applied to code group containers

Context

The content-area scoped rule (#content .code-group, etc.) already had overflow: hidden, but the general selector used by API reference pages did not. Without it, inner elements with border-radius: 0 bleed through the parent's rounded border, making corners appear sharp.

Test plan

  • Verified the fix resolves the issue in production (via browser dev tools)
  • Confirm code blocks on API reference pages render with rounded corners after deploy
  • Confirm code blocks in content pages (guides, quickstarts) are unaffected

Made with Cursor

…lipping

The general .code-group CSS rule was missing overflow: hidden, causing
inner elements (with border-radius: 0) to bleed through the parent's
rounded border on production. This made corners appear sharp and borders
clipped on API reference code blocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 18, 2026

Greptile Summary

Adds overflow: hidden !important to the general .code-group and [data-testid="code-group-select"] CSS rule in mintlify/style.css to fix sharp corners on API reference code blocks where Mintlify's Tailwind overflow-hidden class is no longer applied.

  • The content-scoped selectors (#content .code-group, #content-area .code-group, .prose .code-group) already had overflow: hidden (line 1923), but the general selector used by API reference pages was missing it
  • This single-line addition brings the general selector into parity with the scoped rules, ensuring inner elements with border-radius: 0 are properly clipped by the parent's rounded border
  • No other files are affected

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk — it adds a single well-understood CSS property that already exists on the scoped version of the same rule.
  • The change is a single line of CSS that mirrors an existing rule in the same file. The property (overflow: hidden) is standard and well-understood. The fix addresses a real visual regression on API reference pages and is unlikely to cause side effects.
  • No files require special attention.

Important Files Changed

Filename Overview
mintlify/style.css Single-line addition of overflow: hidden !important to general code-group selector, matching the existing content-scoped rule. No issues found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[".code-group / code-group-select selector"] -->|border-radius: var--ls-radius-md| B["Rounded parent container"]
    A -->|"overflow: hidden ✅ (NEW)"| B
    B --> C["Inner div (border-radius: 0)"]
    C --> D["Code block root (border-radius: 0)"]
    B -->|"Clips inner elements"| E["Corners render rounded ✅"]

    F["#content .code-group (scoped)"] -->|"Already had overflow: hidden"| G["Content pages unaffected"]
Loading

Last reviewed commit: a74098c

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

Comments