Put example outputs in first tab.

This commit is contained in:
Rodrigo Girão Serrão
2023-01-09 13:57:04 +00:00
parent e7afcbc0b5
commit 1300807b3a
13 changed files with 90 additions and 91 deletions

View File

@@ -27,6 +27,11 @@ To specify alignment on a single axis, use the respective style and type:
This example contains a simple app with two labels centered on the screen with `align: center middle;`:
=== "Output"
```{.textual path="docs/examples/styles/align.py"}
```
=== "align.py"
```python
@@ -39,17 +44,16 @@ This example contains a simple app with two labels centered on the screen with `
--8<-- "docs/examples/styles/align.css"
```
=== "Output"
```{.textual path="docs/examples/styles/align.py"}
```
### All alignments
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.
=== "Output"
```{.textual path="docs/examples/styles/align_all.py"}
```
=== "align_all.py"
```python
@@ -62,11 +66,6 @@ Each label has been aligned differently inside its container, and its text shows
--8<-- "docs/examples/styles/align_all.css"
```
=== "Output"
```{.textual path="docs/examples/styles/align_all.py"}
```
## CSS
```sass