From f0ea8a8664a38b62ac5ebdc0b8b3f59cf6db0796 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, 15 Dec 2022 17:24:23 +0000 Subject: [PATCH] Replace statics with labels. --- docs/examples/styles/color.css | 9 +++++---- docs/examples/styles/color.py | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/examples/styles/color.css b/docs/examples/styles/color.css index b5552495a..b44a0d02e 100644 --- a/docs/examples/styles/color.css +++ b/docs/examples/styles/color.css @@ -1,13 +1,14 @@ -Static { +Label { height:1fr; content-align: center middle; + width: 100%; } -#static1 { +#label1 { color: red; } -#static2 { +#label2 { color: rgb(0, 255, 0); } -#static3 { +#label3 { color: hsl(240, 100%, 50%) } diff --git a/docs/examples/styles/color.py b/docs/examples/styles/color.py index 26543b0a0..0f10ea39e 100644 --- a/docs/examples/styles/color.py +++ b/docs/examples/styles/color.py @@ -1,12 +1,12 @@ from textual.app import App -from textual.widgets import Static +from textual.widgets import Label class ColorApp(App): def compose(self): - yield Static("I'm red!", id="static1") - yield Static("I'm rgb(0, 255, 0)!", id="static2") - yield Static("I'm hsl(240, 100%, 50%)!", id="static3") + yield Label("I'm red!", id="label1") + yield Label("I'm rgb(0, 255, 0)!", id="label2") + yield Label("I'm hsl(240, 100%, 50%)!", id="label3") app = ColorApp(css_path="color.css")