You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/textual/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,12 @@ textual-hmr main:DemoApp
12
12
13
13
## What to Observe
14
14
15
-
The app renders a short message from `message.py`.
15
+
The app renders a short message from `message.py` and loads styles from `main.tcss`.
16
16
17
17
- Change the string in `message.py` and save it.
18
18
- The current Textual app instance will exit and restart in-process.
19
19
- The updated message will appear immediately after restart.
20
+
- Change `main.tcss` and save it.
21
+
- Textual will hot-refresh the stylesheet without restarting the Python app.
20
22
21
-
Because `DemoApp` is exported as an `App` subclass, `textual-hmr` also enables Textual's built-in CSS watching by default. You can tweak the inline CSS in `main.py` to compare Python-level restarts with CSS-only refreshes.
23
+
Because `DemoApp` is exported as an `App` subclass, `textual-hmr` also enables Textual's built-in CSS watching by default. This example lets you compare Python-level restarts with TCSS-only refreshes side by side.
0 commit comments