Add complete alignment grid screenshot.

This commit is contained in:
Rodrigo Girão Serrão
2022-12-13 18:30:14 +00:00
parent 26a9e3fced
commit 2faff2fbfc
3 changed files with 96 additions and 1 deletions

View File

@@ -30,7 +30,9 @@ align-vertical: <VERTICAL>;
| `bottom` | Align content at the bottom of the vertical axis |
## Example
## Examples
This example contains a simple app with two labels centered on the screen with `align: center middle;`:
=== "align.py"
@@ -50,6 +52,26 @@ align-vertical: <VERTICAL>;
```
The next example shows a 3 by 3 grid of containers with text labels.
Each label has been aligned differently inside its container, and its text shows its `align: ...` value.
=== "align_all.py"
```python
--8<-- "docs/examples/styles/align_all.py"
```
=== "align_all.css"
```css
--8<-- "docs/examples/styles/align_all.css"
```
=== "Output"
```{.textual path="docs/examples/styles/align_all.py"}
```
## CSS
```sass