mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Uniformise CSS rules reference format.
This commit is contained in:
@@ -3,18 +3,19 @@
|
|||||||
The `align` style aligns children within a container.
|
The `align` style aligns children within a container.
|
||||||
Not to be confused with [`content-align`](../content_align).
|
Not to be confused with [`content-align`](../content_align).
|
||||||
|
|
||||||
You can specify the alignment of children on both the horizontal and vertical axes at the same time,
|
|
||||||
or on each of the axis separately.
|
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
||||||
--8<-- "docs/snippets/syntax_block_start.md"
|
--8<-- "docs/snippets/syntax_block_start.md"
|
||||||
align: <a href="../css_types/horizontal.md"><horizontal></a> <a href="../css_types/vertical.md"><vertical></a>;
|
align: <a href="../css_types/horizontal.md"><horizontal></a> <a href="../css_types/vertical.md"><vertical></a>;
|
||||||
|
|
||||||
align-horizontal: <a href="../css_types/horizontal.md"><horizontal></a>;
|
align-horizontal: <a href="../css_types/horizontal.md"><horizontal></a>;
|
||||||
align-vertical: <a href="../css_types/vertical.md"><vertical></a>;
|
align-vertical: <a href="../css_types/vertical.md"><vertical></a>;
|
||||||
--8<-- "docs/snippets/syntax_block_end.md"
|
--8<-- "docs/snippets/syntax_block_end.md"
|
||||||
|
|
||||||
The style `align` takes a [`<horizontal>`](../css_types/horizontal.md) followed by a [`<vertical>`](../css_types/vertical.md).
|
The style `align` takes a [`<horizontal>`](../css_types/horizontal.md) followed by a [`<vertical>`](../css_types/vertical.md).
|
||||||
|
|
||||||
|
You can specify the alignment of children on both the horizontal and vertical axes at the same time,
|
||||||
|
or on each of the axis separately.
|
||||||
To specify alignment on a single axis, use the respective style and type:
|
To specify alignment on a single axis, use the respective style and type:
|
||||||
|
|
||||||
- `align-horizontal` takes a [`<horizontal>`](../css_types/horizontal.md) and does alignment along the horizontal axis; and
|
- `align-horizontal` takes a [`<horizontal>`](../css_types/horizontal.md) and does alignment along the horizontal axis; and
|
||||||
@@ -22,8 +23,12 @@ To specify alignment on a single axis, use the respective style and type:
|
|||||||
|
|
||||||
### Values
|
### Values
|
||||||
|
|
||||||
|
#### <horizontal>
|
||||||
|
|
||||||
--8<-- "docs/snippets/type_syntax/horizontal.md"
|
--8<-- "docs/snippets/type_syntax/horizontal.md"
|
||||||
|
|
||||||
|
#### <vertical>
|
||||||
|
|
||||||
--8<-- "docs/snippets/type_syntax/vertical.md"
|
--8<-- "docs/snippets/type_syntax/vertical.md"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ The style `background` needs a [`<color>`](../css_types/color.md) followed by an
|
|||||||
|
|
||||||
### Values
|
### Values
|
||||||
|
|
||||||
|
#### <color>
|
||||||
|
|
||||||
--8<-- "docs/snippets/type_syntax/color.md"
|
--8<-- "docs/snippets/type_syntax/color.md"
|
||||||
|
|
||||||
|
#### <percentage>
|
||||||
|
|
||||||
--8<-- "docs/snippets/type_syntax/percentage.md"
|
--8<-- "docs/snippets/type_syntax/percentage.md"
|
||||||
This is clamped between `0%` and `100%`.
|
This is clamped between `0%` and `100%`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user