Skip to content

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

Open
patcapulong wants to merge 2 commits intomainfrom
fix/code-group-corner-radius
Open

fix: add overflow hidden to code group containers for corner radius clipping#205
patcapulong wants to merge 2 commits 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, [data-testid="code-group-select"] CSS rule to ensure proper corner radius clipping on API reference code blocks. The content-area scoped rule (#content .code-group) already had this property, but the general selector used by API reference pages was missing it, causing child elements with border-radius: 0 to bleed through the parent's rounded corners.

  • Fixes visual bug where code group containers displayed sharp corners on API reference pages
  • Aligns general selector behavior with content-area scoped rules that already use overflow: hidden
  • Single-line CSS change with no side effects

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Single-line CSS addition that mirrors existing pattern already used elsewhere in the file. The property is standard, uses !important flag consistently with surrounding rules, and fixes a specific visual bug without introducing any behavioral changes
  • No files require special attention

Important Files Changed

Filename Overview
mintlify/style.css Adds overflow: hidden !important to general .code-group selector to fix corner radius clipping on API reference pages

Last reviewed commit: 3923c34

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