From 289ec2556bcaf04086ad40127706508c108097e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Thu, 22 Dec 2022 18:00:52 +0000 Subject: [PATCH] Tweak example for offset. --- docs/examples/styles/offset.css | 6 +++--- docs/examples/styles/offset.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/examples/styles/offset.css b/docs/examples/styles/offset.css index d0a54a355..673f9fe1c 100644 --- a/docs/examples/styles/offset.css +++ b/docs/examples/styles/offset.css @@ -3,10 +3,10 @@ Screen { color: black; layout: horizontal; } -Static { +Label { width: 20; height: 10; - content-align: center middle; + content-align: center middle; } .paul { @@ -24,7 +24,7 @@ Static { } .chani { - offset: 0 5; + offset: 0 -2; background: blue 20%; border: outer blue; color: blue; diff --git a/docs/examples/styles/offset.py b/docs/examples/styles/offset.py index d850b3778..337e1112a 100644 --- a/docs/examples/styles/offset.py +++ b/docs/examples/styles/offset.py @@ -1,12 +1,12 @@ from textual.app import App -from textual.widgets import Static +from textual.widgets import Label class OffsetApp(App): def compose(self): - yield Static("Paul (offset 8 2)", classes="paul") - yield Static("Duncan (offset 4 10)", classes="duncan") - yield Static("Chani (offset 0 5)", classes="chani") + yield Label("Paul (offset 8 2)", classes="paul") + yield Label("Duncan (offset 4 10)", classes="duncan") + yield Label("Chani (offset 0 -2)", classes="chani") app = OffsetApp(css_path="offset.css")