Skip to content

Commit 68da805

Browse files
Set default container height to 1fr.
1 parent 3aaa4d3 commit 68da805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/textual/containers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Container(Widget):
66

77
DEFAULT_CSS = """
88
Container {
9+
height: 1fr;
910
layout: vertical;
1011
overflow: auto;
1112
}
@@ -17,6 +18,7 @@ class Vertical(Widget):
1718

1819
DEFAULT_CSS = """
1920
Vertical {
21+
height: 1fr;
2022
layout: vertical;
2123
overflow-y: auto;
2224
}
@@ -28,6 +30,7 @@ class Horizontal(Widget):
2830

2931
DEFAULT_CSS = """
3032
Horizontal {
33+
height: 1fr;
3134
layout: horizontal;
3235
overflow-x: hidden;
3336
}
@@ -39,6 +42,7 @@ class Grid(Widget):
3942

4043
DEFAULT_CSS = """
4144
Grid {
45+
height: 1fr;
4246
layout: grid;
4347
}
4448
"""
@@ -49,6 +53,7 @@ class Content(Widget, can_focus=True, can_focus_children=False):
4953

5054
DEFAULT_CSS = """
5155
Vertical {
56+
height: 1fr;
5257
layout: vertical;
5358
overflow-y: auto;
5459
}

0 commit comments

Comments
 (0)