Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overflow: auto when using the anchor prop #3138

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Apr 25, 2024

We want to constrain the anchored element within the viewport (minus the padding if there is some). But without an overflow: auto, it would overflow and the maxWidth / maxHeight are a bit pointless.

Once you opt-in to anchor, then we have to provide styles anyway. This improves the UX.

We want to constrain the anchored element within the viewport (minus the
padding if there is some). But without an `overflow: auto`, it would
overflow and the `maxWidth` / `maxHeight` are a bit pointless.

Once you opt-in to `anchor`, then we have to provide styles anywhere.
This improves the UX.
Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 3:12pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 3:12pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants