From 330db5fc80d9926f3030427f355c212bb7fff015 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 31 Jan 2023 12:43:07 +0100 Subject: [PATCH] snapshot --- .../snapshot_apps/auto_width_input.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/snapshot_tests/snapshot_apps/auto_width_input.py diff --git a/tests/snapshot_tests/snapshot_apps/auto_width_input.py b/tests/snapshot_tests/snapshot_apps/auto_width_input.py new file mode 100644 index 000000000..aafffaf8d --- /dev/null +++ b/tests/snapshot_tests/snapshot_apps/auto_width_input.py @@ -0,0 +1,26 @@ +from textual.app import App, ComposeResult +from textual.containers import Vertical +from textual.widgets import Header, Footer, Label, Input + + +class InputWidthAutoApp(App[None]): + + CSS = """ + Screen { + align: center middle; + } + Input.auto { + width: auto; + max-width: 100%; + } + + """ + + def compose(self) -> ComposeResult: + yield Header() + yield Input(placeholder="This has auto width", classes="auto") + yield Footer() + + +if __name__ == "__main__": + InputWidthAutoApp().run()