mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
@@ -1,6 +1,6 @@
|
||||
# Max-width
|
||||
|
||||
The `max-width` rule sets a maximum width for a widget.
|
||||
The `max-width` style sets a maximum width for a widget.
|
||||
|
||||
## Syntax
|
||||
|
||||
@@ -8,12 +8,12 @@ The `max-width` rule sets a maximum width for a widget.
|
||||
max-width: <a href="../../css_types/scalar"><scalar></a>;
|
||||
--8<-- "docs/snippets/syntax_block_end.md"
|
||||
|
||||
The `max-width` rule accepts a [`<scalar>`](../../css_types/scalar) that defines an upper bound for the [`width`](./width) of a widget.
|
||||
The `max-width` style accepts a [`<scalar>`](../../css_types/scalar) that defines an upper bound for the [`width`](./width) of a widget.
|
||||
That is, the width of a widget is never allowed to exceed `max-width`.
|
||||
|
||||
## Example
|
||||
|
||||
The example below shows some placeholders that were defined to span horizontally from the top edge of the terminal to the bottom edge.
|
||||
The example below shows some placeholders that were defined to span horizontally from the left edge of the terminal to the right edge.
|
||||
Then, we set `max-width` individually on each placeholder.
|
||||
|
||||
=== "Output"
|
||||
|
||||
Reference in New Issue
Block a user