Styles documentation for links properties

This commit is contained in:
Darren Burns
2022-10-11 11:22:24 +01:00
parent 999f39034a
commit f6452bbbd5
5 changed files with 82 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
#custom {
width: auto;
link-color: black 90%;
link-background: dodgerblue;
link-style: bold underline;
}

View File

@@ -0,0 +1,18 @@
from textual.app import App, ComposeResult
from textual.widgets import Static
TEXT = """\
Here is a [@click='app.bell']link[/] which you can click!
"""
class LinksApp(App):
def compose(self) -> ComposeResult:
yield Static(TEXT)
yield Static(TEXT, id="custom")
app = LinksApp(css_path="links.css")
if __name__ == "__main__":
app.run()