Skip to content

Commit f867d13

Browse files
committed
docstrings
1 parent 98b50f2 commit f867d13

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/textual/app.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,22 +484,25 @@ class MyApp(App[None]):
484484

485485
HORIZONTAL_BREAKPOINTS: ClassVar[list[tuple[int, str]]] | None = []
486486
"""List of horizontal breakpoints for responsive classes.
487+
488+
This allows for styles to be responsive to the dimensions of the terminal.
489+
For instance, you might want to show less information, or fewer columns on a narrow displays -- or more information when the terminal is sized wider than usual.
487490
488-
A breakpoint consists of a tuple containing the width where the class is set, and the classname to set.
491+
A breakpoint consists of a tuple containing the width where the class is applied, and the name of the class to set.
489492
490493
Example:
491494
```python
492495
# Up to 80 cells wide, the app has the class "-normal"
493496
# 80 - 119 cells wide, the app has the class "-wide"
494497
# 120 cells or wider, the app has the class "-very-wide"
495-
[(0, "-normal"), (80, "-wide"), (120, "-very-wide")]
498+
HORIZONTAL_BREAKPOINTS = [(0, "-normal"), (80, "-wide"), (120, "-very-wide")]
496499
```
497500
498501
"""
499502
VERTICAL_BREAKPOINTS: ClassVar[list[tuple[int, str]]] | None = []
500503
"""List of vertical breakpoints for responsive classes.
501504
502-
Contents are the same as `HORIZONTAL_BREAKPOINTS`, but the integer is compared to the height, rather than the width.
505+
Contents are the same as [`HORIZONTAL_BREAKPOINTS`][textual.app.App.HORIZONTAL_BREAKPOINTS], but the integer is compared to the height, rather than the width.
503506
"""
504507

505508
_PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = {

0 commit comments

Comments
 (0)