We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6918ed7 commit 8f9aa3aCopy full SHA for 8f9aa3a
tests/snapshot_tests/test_snapshots.py
@@ -4502,3 +4502,31 @@ def compose(self) -> ComposeResult:
4502
pass
4503
4504
assert snap_compare(EmptyApp())
4505
+
4506
4507
+def test_stream_layout(snap_compare):
4508
+ """Test stream layout."""
4509
4510
+ class StreamApp(App):
4511
+ CSS = """
4512
+ VerticalScroll {
4513
+ layout: stream;
4514
+ Label {
4515
+ background: blue;
4516
+ margin: 1;
4517
+ }
4518
+ #many-lines {
4519
+ max-height: 3;
4520
4521
4522
+ """
4523
4524
+ def compose(self) -> ComposeResult:
4525
+ with VerticalScroll():
4526
+ yield Label("Hello")
4527
+ yield Label("foo\nbar")
4528
+ yield Label(
4529
+ "\n".join(["Only 3 lines should be visible"] * 100), id="many-lines"
4530
+ )
4531
4532
+ assert snap_compare(StreamApp())
0 commit comments