-
Notifications
You must be signed in to change notification settings - Fork 875
overlay
style removes the neighboring margin
#5670
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
Comments
overlay
style removes the marginoverlay
style removes the neighboring margin
This is because the margin overlaps with the previous widget in the DOM. When you make the overlay visible, it makes the previous widget the overlay, rather than the Input. It's possible we can be a little smarter than this re margins. In the meantime, you could put your Input + Overlay inside a container. That should give the effect you are looking for, |
It doesn't look easy to handle this transparently. Putting the Input and Overlay in a VerticalGroup seems like a workable solution. Closing as I think this is good enough for now. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
The
overlay
style (added in Textual v0.24.0) is still undocumented, so I'm not sure if this is a bug or I've misunderstood how the overlay should work.Here's a minimal example. After typing in the input to show the overlay, the top margin of the button below will disappear:
The text was updated successfully, but these errors were encountered: