mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
added color reference and docs
This commit is contained in:
28
sandbox/will/box.css
Normal file
28
sandbox/will/box.css
Normal 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
13
sandbox/will/box.py
Normal 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()
|
||||
Reference in New Issue
Block a user