Closed
Description
since 0.86.2 offset has no effect on widgets within a grid.
here's a grid from examples, modified to add a widget id and an offset to that id.
from textual.app import App, ComposeResult
from textual.widgets import Static
class GridLayoutExample(App):
CSS_PATH = "grid_layout1.tcss"
def compose(self) -> ComposeResult:
yield Static("One", classes="box")
yield Static("Two", classes="box")
yield Static("Three", classes="box")
yield Static("Four", classes="box")
yield Static("Five", classes="box")
yield Static("Six", classes="box", id="six")
if __name__ == "__main__":
app = GridLayoutExample()
app.run()
Screen {
layout: grid;
grid-size: 3 2;
}
.box {
height: 100%;
border: solid green;
}
#six {
offset: 0 10;
}
Textual Diagnostics
Versions
Name | Value |
---|---|
Textual | 0.86.2 |
Rich | 13.8.1 |
Python
Name | Value |
---|---|
Version | 3.12.6 |
Implementation | CPython |
Compiler | MSC v.1940 64 bit (AMD64) |
Executable | C:\Users\thisguy\AppData\Local\Programs\Python\Python312\python.exe |
Operating System
Name | Value |
---|---|
System | Windows |
Release | 11 |
Version | 10.0.22631 |
Terminal
Name | Value |
---|---|
Terminal Application | Windows Terminal |
TERM | Not set |
COLORTERM | Not set |
FORCE_COLOR | Not set |
NO_COLOR | Not set |
Rich Console options
Name | Value |
---|---|
size | width=116, height=69 |
legacy_windows | False |
min_width | 1 |
max_width | 116 |
is_terminal | True |
encoding | utf-8 |
max_height | 69 |
justify | None |
overflow | None |
no_wrap | False |
highlight | None |
markup | None |
height | None |
Metadata
Metadata
Assignees
Labels
No labels