added color reference and docs

This commit is contained in:
Will McGugan
2022-09-10 22:00:51 +01:00
parent b1fa3c0a2a
commit b6341ddb50
10 changed files with 161 additions and 126 deletions

28
sandbox/will/box.css Normal file
View File

@@ -0,0 +1,28 @@
Screen {
background: white;
color:black;
}
#box1 {
width: 10;
height: 5;
background: red 40%;
box-sizing: content-box;
}
#box2 {
width: 10;
height: 5;
padding: 1;
background:blue 40%;
box-sizing: content-box;
}
#box3 {
width: 10;
height: 5;
background:green 40%;
border: heavy;
box-sizing: content-box;
}

13
sandbox/will/box.py Normal file
View File

@@ -0,0 +1,13 @@
from textual.app import App
from textual.widgets import Static
class BoxApp(App):
def compose(self):
yield Static("0123456789", id="box1")
yield Static("0123456789", id="box2")
yield Static("0123456789", id="box3")
app = BoxApp(css_path="box.css")
app.run()