-
Notifications
You must be signed in to change notification settings - Fork 780
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
max-height: 100%
with a height: auto
container causes child widget to disappear
#2975
Comments
It is less to do with styling, and more to do with the fact that I think the only resolution would be to make this an error. i.e. something like Suggest we are fairly cautious about what we add this to. Some widgets may not be containers by default, but could be styled to be containers. Let @willmcgugan know if this is more than half a day's work. |
Somewhat related, because I see folk using
in the the docs for Also, the tutorial uses |
Yup, I can confirm this is what I was doing too when I was new to Textual based on the docs! The specific mention of |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
The `max-height` of the `DataTable` was changed to 100vh rather than 100% in Textualize#3566, because at the time this caused issues with auto height containers, as described in Textualize#2975. However this issue was later fixed in Textualize#3814. This PR changes the `max-height` of the `DataTable` back to 100%, as 100vh will actually break common layouts and seems no longer required to workaround this auto height issue. Fixes Textualize#4286.
Given this code:
the
DataTable
doesn't show. This seems to be the combination of a child widget that isheight: auto;
andmax-height: 100%;
with a parent container that isheight: auto
.More generally the issue seems to be that if a child widget is
height: auto
andmax-height: 100%
and the parent container isheight: auto
there's no way to work out a height.Perhaps there's some scope here to settle on a less astonishing outcome?
The text was updated successfully, but these errors were encountered: