From 71b859b6e255dac458cd41d5912466614019c931 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: Mon, 9 Jan 2023 13:49:32 +0000 Subject: [PATCH] Add thorough example for all outlines. --- docs/examples/styles/outline_all.css | 72 ++++++++++++++++++++++++++++ docs/examples/styles/outline_all.py | 26 ++++++++++ 2 files changed, 98 insertions(+) create mode 100644 docs/examples/styles/outline_all.css create mode 100644 docs/examples/styles/outline_all.py diff --git a/docs/examples/styles/outline_all.css b/docs/examples/styles/outline_all.css new file mode 100644 index 000000000..63215bae7 --- /dev/null +++ b/docs/examples/styles/outline_all.css @@ -0,0 +1,72 @@ +#ascii { + outline: ascii $accent; +} + +#blank { + outline: blank $accent; +} + +#dashed { + outline: dashed $accent; +} + +#double { + outline: double $accent; +} + +#heavy { + outline: heavy $accent; +} + +#hidden { + outline: hidden $accent; +} + +#hkey { + outline: hkey $accent; +} + +#inner { + outline: inner $accent; +} + +#none { + outline: none $accent; +} + +#outer { + outline: outer $accent; +} + +#round { + outline: round $accent; +} + +#solid { + outline: solid $accent; +} + +#tall { + outline: tall $accent; +} + +#vkey { + outline: vkey $accent; +} + +#wide { + outline: wide $accent; +} + +Grid { + grid-size: 3 5; + align: center middle; + grid-gutter: 1 2; +} + +Label { + width: 20; + height: 3; + content-align: center middle; + background: red; +} diff --git a/docs/examples/styles/outline_all.py b/docs/examples/styles/outline_all.py new file mode 100644 index 000000000..5c7a5f445 --- /dev/null +++ b/docs/examples/styles/outline_all.py @@ -0,0 +1,26 @@ +from textual.app import App +from textual.containers import Grid +from textual.widgets import Label + + +class AllOutlinesApp(App): + def compose(self): + yield Grid( + Label("ascii", id="ascii"), + Label("blank", id="blank"), + Label("dashed", id="dashed"), + Label("double", id="double"), + Label("heavy", id="heavy"), + Label("hidden/none", id="hidden"), + Label("hkey", id="hkey"), + Label("inner", id="inner"), + Label("none", id="none"), + Label("outer", id="outer"), + Label("round", id="round"), + Label("solid", id="solid"), + Label("tall", id="tall"), + Label("vkey", id="vkey"), + Label("wide", id="wide"), + ) + +app = AllOutlinesApp(css_path="outline_all.css")