mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' into widget-doc-sweep
This commit is contained in:
@@ -300,6 +300,12 @@ So, thanks to this bit of code in my `Activity` widget...
|
||||
self.save_activity_list()
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
The code above used `emit_no_wait`. Since this blog post was first
|
||||
published that method has been removed from Textual. You should use
|
||||
[`post_message_no_wait` or `post_message`](/guide/events/#sending-messages) instead now.
|
||||
|
||||
### Pain points
|
||||
|
||||
On top of the issues of getting to know terminal-based-CSS that I mentioned
|
||||
|
||||
@@ -157,10 +157,14 @@ The chapter on [Textual CSS](CSS.md) describes how to use CSS in detail. For now
|
||||
|
||||
The following example enables loading of CSS by adding a `CSS_PATH` class variable:
|
||||
|
||||
```python title="question02.py" hl_lines="6"
|
||||
```python title="question02.py" hl_lines="6 9"
|
||||
--8<-- "docs/examples/app/question02.py"
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
We also added an `id` to the `Label`, because we want to style it in the CSS.
|
||||
|
||||
If the path is relative (as it is above) then it is taken as relative to where the app is defined. Hence this example references `"question01.css"` in the same directory as the Python code. Here is that CSS file:
|
||||
|
||||
```sass title="question02.css"
|
||||
|
||||
Reference in New Issue
Block a user