mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more docs and diagrams
This commit is contained in:
@@ -3,26 +3,10 @@ from textual.widgets import Static
|
||||
|
||||
|
||||
class ColorApp(App):
|
||||
CSS = """
|
||||
Static {
|
||||
height:1fr;
|
||||
content-align: center middle;
|
||||
}
|
||||
#static1 {
|
||||
color: red;
|
||||
}
|
||||
#static2 {
|
||||
color: rgb(0, 255, 0);
|
||||
}
|
||||
#static3 {
|
||||
color: hsl(240, 100%, 50%)
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self):
|
||||
yield Static("I'm red!", id="static1")
|
||||
yield Static("I'm rgb(0, 255, 0)!", id="static2")
|
||||
yield Static("I'm hsl(240, 100%, 50%)!", id="static3")
|
||||
|
||||
|
||||
app = ColorApp()
|
||||
app = ColorApp(css_path="color.css")
|
||||
|
||||
Reference in New Issue
Block a user