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,30 +3,9 @@ from textual.widgets import Static
|
||||
|
||||
|
||||
class BoxSizingApp(App):
|
||||
CSS = """
|
||||
Screen {
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
Static {
|
||||
background: blue 20%;
|
||||
height: 5;
|
||||
margin: 2;
|
||||
padding: 1;
|
||||
border: wide black;
|
||||
}
|
||||
#static1 {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#static2 {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
def compose(self):
|
||||
yield Static("I'm using border-box!", id="static1")
|
||||
yield Static("I'm using content-box!", id="static2")
|
||||
|
||||
|
||||
app = BoxSizingApp()
|
||||
app = BoxSizingApp(css_path="box_sizing.css")
|
||||
|
||||
Reference in New Issue
Block a user