Add subsections for references with 2+ examples.

This commit is contained in:
Rodrigo Girão Serrão
2023-01-09 13:50:45 +00:00
parent 71b859b6e2
commit dd6e73aa39
14 changed files with 103 additions and 4 deletions

View File

@@ -13,6 +13,8 @@ By default, it sets the height of the content area, but if [`box-sizing`](./box_
## Examples
### Basic usage
This examples creates a widget with a height of 50% of the screen.
=== "height.py"
@@ -32,6 +34,8 @@ This examples creates a widget with a height of 50% of the screen.
```{.textual path="docs/examples/styles/height.py"}
```
### All height formats
The next example creates a series of wide widgets with heights set with different units.
Open the CSS file tab to see the comments that explain how each height is computed.
(The output includes a vertical ruler on the right to make it easier to check the height of each widget.)