Skip to content

Commit 3635d5e

Browse files
fix(oc-docs): cap menu dropdown height so long lists scroll
The assertion operator dropdown lists 28 options; the shared MenuDropdown surface was capped at 90vh, which measures the browser viewport rather than the embedded component, so the list spilled past the app. Cap the surface at min(20rem, 90vh) so long lists scroll instead of overflowing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d2c6058 commit 3635d5e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/oc-docs/src/ui/MenuDropdown/StyledWrapper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ export const StyledWrapper = styled.div`
1616
box-shadow: var(--oc-dropdown-shadow);
1717
border-radius: var(--oc-border-radius-base);
1818
border: 1px solid var(--oc-dropdown-border);
19-
max-height: 90vh;
19+
/* Cap the surface height so a long list (e.g. the assertion operators) scrolls
20+
instead of spilling past the embedded component; min() keeps it within small
21+
viewports too. */
22+
max-height: min(20rem, 90vh);
2023
overflow-y: auto;
2124
max-width: unset !important;
2225
padding: 0.25rem;

0 commit comments

Comments
 (0)