-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
ToastRack positioning does not seem to work. Like suggested in the docs I've added ToastRack { align: right top; } in my CSS. Below I've added it to the Toast example. But the ToastRack stays in its default bottom right position and the changed CSS does not seem to apply.
Code
#!/usr/bin/env python3
from textual.app import App
class ToastApp(App[None]):
CSS = """
ToastRack {
align: right top;
}
"""
def on_mount(self) -> None:
# Show an information notification.
self.notify("It's an older code, sir, but it checks out.")
# Show a warning. Note that Textual's notification system allows
# for the use of Rich console markup.
self.notify(
"Now witness the firepower of this fully "
"[b]ARMED[/b] and [i][b]OPERATIONAL[/b][/i] battle station!",
title="Possible trap detected",
severity="warning",
)
# Show an error. Set a longer timeout so it's noticed.
self.notify("It's a trap!", severity="error", timeout=10)
# Show an information notification, but without any sort of title.
self.notify("It's against my programming to impersonate a deity.", title="")
if __name__ == "__main__":
ToastApp().run()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels