changed to CSS_PATH

This commit is contained in:
Will McGugan
2022-09-18 22:02:08 +01:00
parent f2c5e6ce78
commit d0293c2c89
80 changed files with 261 additions and 741 deletions

View File

@@ -104,9 +104,11 @@ class Success(Widget):
return Text("This is a success message", justify="center")
class BasicApp(App, css_path="basic.css"):
class BasicApp(App):
"""A basic app demonstrating CSS"""
CSS_PATH = "basic.css"
def on_load(self):
"""Bind keys here."""
self.bind("s", "toggle_class('#sidebar', '-active')", description="Sidebar")
@@ -210,9 +212,8 @@ class BasicApp(App, css_path="basic.css"):
self.bell()
app = BasicApp()
if __name__ == "__main__":
app = BasicApp()
app.run(quit_after=2)
# from textual.geometry import Region