mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
wrong place
This commit is contained in:
21
offset.css
21
offset.css
@@ -1,21 +0,0 @@
|
||||
Screen {
|
||||
layout: center;
|
||||
}
|
||||
|
||||
#parent {
|
||||
width: 32;
|
||||
height: 8;
|
||||
background: $panel;
|
||||
}
|
||||
|
||||
#tag {
|
||||
color: $text;
|
||||
background: $success;
|
||||
padding: 1 2;
|
||||
width: auto;
|
||||
/* offset: -8 -4; */
|
||||
}
|
||||
|
||||
#child {
|
||||
background: red;
|
||||
}
|
||||
17
offset.py
17
offset.py
@@ -1,17 +0,0 @@
|
||||
from textual import layout
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class OffsetExample(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield layout.Vertical(
|
||||
Static("Child", id="child"),
|
||||
id="parent"
|
||||
)
|
||||
yield Static("Tag", id="tag")
|
||||
|
||||
|
||||
app = OffsetExample(css_path="offset.css")
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
Reference in New Issue
Block a user