Border style (#2292)

* border styles

* docs for border styles

* fix tests

* tests

* tests and docs

* changelog

* implement auto

* style information fix
This commit is contained in:
Will McGugan
2023-04-16 12:31:39 +01:00
committed by GitHub
parent 9fb63f9b53
commit 0509cf8948
27 changed files with 1807 additions and 1247 deletions

View File

@@ -0,0 +1,16 @@
Screen {
align: center middle;
}
Label {
padding: 4 8;
border: heavy red;
border-title-color: green;
border-title-background: white;
border-title-style: bold;
border-subtitle-color: magenta;
border-subtitle-background: yellow;
border-subtitle-style: italic;
}

View File

@@ -0,0 +1,19 @@
from textual.app import App, ComposeResult
from textual.widgets import Label
class BorderTitleApp(App):
CSS_PATH = "border_title_colors.css"
def compose(self) -> ComposeResult:
yield Label("Hello, World!")
def on_mount(self) -> None:
label = self.query_one(Label)
label.border_title = "Textual Rocks"
label.border_subtitle = "Textual Rocks"
if __name__ == "__main__":
app = BorderTitleApp()
app.run()