mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
changed to CSS_PATH
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user