Skip to content

feat: Add automatic dropdown positioning#1014

Open
MoritzWeber0 wants to merge 3 commits into
mainfrom
fix/dropdown-overflows
Open

feat: Add automatic dropdown positioning#1014
MoritzWeber0 wants to merge 3 commits into
mainfrom
fix/dropdown-overflows

Conversation

@MoritzWeber0

Copy link
Copy Markdown
Member

Use the new anchor and position-try systems in CSS, available since January in all major browsers to automatically position the dropdown menu.

image

For horizontal positioning, automatically shift the dropdown menu to the left if there is not enough space on the screen. For vertical positioning, use scrolling to handle the overflow.

Resolves #1013

@github-actions

Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@netlify

netlify Bot commented Jun 20, 2026

Copy link
Copy Markdown

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit bfb3cba
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6a39a12396b71f0008250a6a
😎 Deploy Preview https://deploy-preview-1014--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@MoritzWeber0 MoritzWeber0 added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Jun 21, 2026
@MoritzWeber0 MoritzWeber0 requested a review from therobrob June 21, 2026 10:47
@lenderom

Copy link
Copy Markdown
Member

Hi @MoritzWeber0 thank you for your implemenation :)
Is there a way to hide the scrollbar in the menu?
image
(I guess it only appears on smaller screens)

@MoritzWeber0

Copy link
Copy Markdown
Member Author

Hi @MoritzWeber0 thank you for your implemenation :) Is there a way to hide the scrollbar in the menu?

It should only appear if the scrollbar is necessary because the content overflows, which does happen on browser viewport with < 520px height. There are workarounds to hide scrollbars, but usually not really recommended as it also overwrites the system preferences regarding scrollbars. The default on Windows is to show the scrollbar, while on Android or macOS this isn't the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation dropdown overflows on mobile in landscape mode

2 participants