docs: fix menu clipping in resizable examples + configurable dev port#42470
Merged
Conversation
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.
Member
Author
|
Another fix for @coliff's feedback on clipped menus in resizable examples. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related docs/tooling fixes:
Resizable examples no longer clip menus. The resizable container needs
overflow: hiddenfor the CSSresizehandle 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 withdata-bs-strategy="fixed"soposition: fixedlets 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 readsPORT(defaulting to9001) inastro.config.tsfor bothserver.portand the devsiteURL, and the hardcoded--port 9001flags were dropped from the npm scripts. This lets multiple worktrees run side by side without colliding:Notes
dist/is intentionally not included.