mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
docs framework
This commit is contained in:
@@ -3,26 +3,9 @@ from textual.widgets import Static
|
||||
|
||||
|
||||
class TextApp(App):
|
||||
CSS = """
|
||||
Screen {
|
||||
background: darkblue;
|
||||
color: white;
|
||||
layout: vertical;
|
||||
}
|
||||
Static {
|
||||
height: auto;
|
||||
padding: 2;
|
||||
border: heavy white;
|
||||
background: #ffffff 30%;
|
||||
content-align: center middle;
|
||||
/**/
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Static("Hello")
|
||||
yield Static("[b]World![/b]")
|
||||
|
||||
|
||||
app = TextApp()
|
||||
app = TextApp(css_path="simple.css")
|
||||
|
||||
Reference in New Issue
Block a user