mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Styles documentation for links properties
This commit is contained in:
6
docs/examples/styles/links.css
Normal file
6
docs/examples/styles/links.css
Normal file
@@ -0,0 +1,6 @@
|
||||
#custom {
|
||||
width: auto;
|
||||
link-color: black 90%;
|
||||
link-background: dodgerblue;
|
||||
link-style: bold underline;
|
||||
}
|
||||
18
docs/examples/styles/links.py
Normal file
18
docs/examples/styles/links.py
Normal 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()
|
||||
Reference in New Issue
Block a user