Skip to content

docs: fix menu clipping in resizable examples + configurable dev port#42470

Merged
mdo merged 2 commits into
v6-devfrom
mdo/fix-menu-cutoff-resizable
Jun 4, 2026
Merged

docs: fix menu clipping in resizable examples + configurable dev port#42470
mdo merged 2 commits into
v6-devfrom
mdo/fix-menu-cutoff-resizable

Conversation

@mdo
Copy link
Copy Markdown
Member

@mdo mdo commented Jun 4, 2026

Summary

Two related docs/tooling fixes:

  • Resizable examples no longer clip menus. The resizable container needs overflow: hidden for the CSS resize handle to work, which was clipping .menu/dropdown popovers when they opened (e.g. the navbar "Menu link" example). The live preview now renders those toggles with data-bs-strategy="fixed" so position: fixed lets the menu spill outside the container. The displayed/copyable markup is left untouched, and a negative lookahead avoids duplicating a strategy if one is already set.

  • Astro dev/preview port is configurable. The port was hardcoded to 9001. It now reads PORT (defaulting to 9001) in astro.config.ts for both server.port and the dev site URL, and the hardcoded --port 9001 flags were dropped from the npm scripts. This lets multiple worktrees run side by side without colliding:

    PORT=9123 npm start

Notes

  • dist/ is intentionally not included.

mdo added 2 commits June 4, 2026 14:47
The resizable container needs overflow: hidden for the CSS resize handle to
work, which clips menus/dropdowns when they open. Render them with a fixed
positioning strategy in the live preview only so they can spill outside the
container, leaving the displayed markup untouched.
Default to 9001 but allow PORT to override the dev/preview server port so
multiple worktrees can run side by side without colliding.
@mdo mdo added the v6 label Jun 4, 2026
@mdo mdo added this to v6.0.0 Jun 4, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Jun 4, 2026
@mdo mdo added the meta label Jun 4, 2026
@mdo
Copy link
Copy Markdown
Member Author

mdo commented Jun 4, 2026

Another fix for @coliff's feedback on clipped menus in resizable examples.

@mdo mdo merged commit 4d54391 into v6-dev Jun 4, 2026
12 checks passed
@mdo mdo deleted the mdo/fix-menu-cutoff-resizable branch June 4, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant