Skip to content

Commit c848e22

Browse files
patcapulongclaudecursoragent
authored
Fix account tabs overflow with wrapping pill-style tabs (#225)
## Summary - Replace horizontal scroll behavior on API reference tab lists (oneOf schema variants) with flex-wrap pill-style buttons that handle 20+ account types gracefully across viewports - Remove dead `scroll-fade.js` (117-line drag-to-scroll + fade gradient script) and its `<script>` tag from `docs.json` that was loading on every page for zero benefit ## Test plan - [ ] Verify API reference pages with many tabs (e.g. External Accounts) wrap correctly - [ ] Verify no console errors from missing `scroll-fade.js` - [ ] Check light and dark mode tab styling - [ ] Check mobile viewport wrapping behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 56edba4 commit c848e22

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Grid is an API for global payments across fiat, stablecoins, and Bitcoin.
1313
- Use snippets from `mintlify/snippets/` instead of duplicating content across use cases
1414
- Follow writing standards in `mintlify/CLAUDE.md` for all documentation content
1515
- MDX files require frontmatter with `title` and `description`
16-
- Do not use `React.useEffect` in MDX — it breaks Mintlify's acorn parser. `React.useState` is fine.
16+
- React hooks (`useState`, `useEffect`, etc.) work in MDX. If the acorn parser throws, it's usually a JS expression issue (e.g., template literals in JSX curlies), not the hook itself.
1717

1818
## Commands
1919

mintlify/style.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,6 +2564,55 @@ html.dark [data-component-part="tab-button"][data-active="true"] {
25642564
border-color: var(--ls-gray-100) !important;
25652565
}
25662566

2567+
/* --- API Reference: Wrap overflowing tab lists with pill-style buttons --- */
2568+
2569+
#api-playground-2-operation-page [data-component-part="tabs-list"] {
2570+
flex-wrap: wrap !important;
2571+
overflow-x: visible !important;
2572+
gap: 6px !important;
2573+
border-bottom: none !important;
2574+
padding: 16px 0 0 0 !important;
2575+
}
2576+
2577+
#api-playground-2-operation-page [data-component-part="tab-button"] {
2578+
border: 0.5px solid transparent !important;
2579+
border-radius: 6px !important;
2580+
padding: 4px 14px !important;
2581+
margin-bottom: 0 !important;
2582+
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
2583+
}
2584+
2585+
#api-playground-2-operation-page [data-component-part="tab-button"][data-active="false"] {
2586+
border-color: transparent !important;
2587+
background: var(--ls-black-02) !important;
2588+
}
2589+
2590+
html.dark #api-playground-2-operation-page [data-component-part="tab-button"][data-active="false"] {
2591+
background: var(--ls-white-02) !important;
2592+
}
2593+
2594+
#api-playground-2-operation-page [data-component-part="tab-button"][data-active="false"]:hover {
2595+
border-color: transparent !important;
2596+
background: rgba(0, 0, 0, 0.05) !important;
2597+
}
2598+
2599+
html.dark #api-playground-2-operation-page [data-component-part="tab-button"][data-active="false"]:hover {
2600+
border-color: transparent !important;
2601+
background: rgba(255, 255, 255, 0.08) !important;
2602+
}
2603+
2604+
#api-playground-2-operation-page [data-component-part="tab-button"][data-active="true"] {
2605+
border: 0.5px solid rgba(0, 0, 0, 0.1) !important;
2606+
background: var(--ls-white) !important;
2607+
color: var(--ls-gray-950) !important;
2608+
}
2609+
2610+
html.dark #api-playground-2-operation-page [data-component-part="tab-button"][data-active="true"] {
2611+
border: 0.5px solid rgba(255, 255, 255, 0.1) !important;
2612+
background: var(--ls-white-10) !important;
2613+
color: var(--ls-white) !important;
2614+
}
2615+
25672616
/* ===========================================
25682617
Tables
25692618
=========================================== */

0 commit comments

Comments
 (0)