mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more docs
This commit is contained in:
27
docs/examples/styles/visibility.py
Normal file
27
docs/examples/styles/visibility.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from textual.app import App
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class VisibilityApp(App):
|
||||
CSS = """
|
||||
Screen {
|
||||
background: green;
|
||||
}
|
||||
Static {
|
||||
height: 5;
|
||||
background: white;
|
||||
color: blue;
|
||||
border: heavy blue;
|
||||
}
|
||||
Static.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self):
|
||||
yield Static("Widget 1")
|
||||
yield Static("widget 2", classes="invisible")
|
||||
yield Static("widget 3")
|
||||
|
||||
|
||||
app = VisibilityApp()
|
||||
Reference in New Issue
Block a user