* nested * remove debug * patch scope * fix nested * docs * clarification * docstring * fix test * remove debug * copy * fix example * wording * Apply suggestions from code review Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> Co-authored-by: Dave Pearson <davep@davep.org> * highlighting * wording * wording * check errors * type checking: * extra errors * extra test [skip ci] --------- Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> Co-authored-by: Dave Pearson <davep@davep.org>
19 lines
479 B
Python
19 lines
479 B
Python
from textual.app import App, ComposeResult
|
|
from textual.containers import Horizontal
|
|
from textual.widgets import Static
|
|
|
|
|
|
class NestingDemo(App):
|
|
"""App with nested CSS."""
|
|
|
|
CSS_PATH = "nesting02.tcss"
|
|
|
|
def compose(self) -> ComposeResult:
|
|
with Horizontal(id="questions"):
|
|
yield Static("Yes", classes="button affirmative")
|
|
yield Static("No", classes="button negative")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = NestingDemo()
|
|
app.run()
|