mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Increase negative y offset.
This commit is contained in:
@@ -24,7 +24,7 @@ Label {
|
||||
}
|
||||
|
||||
.chani {
|
||||
offset: 0 -2;
|
||||
offset: 0 -3;
|
||||
background: blue 20%;
|
||||
border: outer blue;
|
||||
color: blue;
|
||||
|
||||
@@ -6,7 +6,7 @@ class OffsetApp(App):
|
||||
def compose(self):
|
||||
yield Label("Paul (offset 8 2)", classes="paul")
|
||||
yield Label("Duncan (offset 4 10)", classes="duncan")
|
||||
yield Label("Chani (offset 0 -2)", classes="chani")
|
||||
yield Label("Chani (offset 0 -3)", classes="chani")
|
||||
|
||||
|
||||
app = OffsetApp(css_path="offset.css")
|
||||
|
||||
@@ -39,13 +39,13 @@ In this example, we have 3 widgets with differing offsets.
|
||||
## CSS
|
||||
|
||||
```sass
|
||||
/* Move the widget 8 cells in the x direction and 2 in tye y direction */
|
||||
/* Move the widget 8 cells in the x direction and 2 in the y direction */
|
||||
offset: 8 2;
|
||||
|
||||
/* Move the widget 4 cells in the x direction
|
||||
offset-x: 4;
|
||||
/* Move the widget -2 cells in the y direction
|
||||
offset-y: -2;
|
||||
/* Move the widget -3 cells in the y direction
|
||||
offset-y: -3;
|
||||
```
|
||||
|
||||
## Python
|
||||
|
||||
Reference in New Issue
Block a user