Files
textual/docs/styles/grid/column_span.md
Rodrigo Girão Serrão da9a481f1c Remove inclusion of old css types snippets.
Supposedly, this had been done in an earlier commit for all styles. Apparently, I forgot to open styles references that were one level deeper in the directory, so the pages about grid, links, and scrollbar colors still included the css types values directly in their reference pages.
2023-01-09 11:28:47 +00:00

985 B

Column-span

The column-span style specifies how many rows a widget will span in a grid layout.

!!! note

This style only affects widgets that are direct children of a widget with `layout: grid`.

Syntax

--8<-- "docs/snippets/syntax_block_start.md" column-span: <integer>; --8<-- "docs/snippets/syntax_block_end.md"

The style column-span accepts a single non-negative <integer> that quantifies how many columns the given widget spans.

Example

The example below shows a 4 by 4 grid where many placeholders span over several columns.

=== "Output"

```{.textual path="docs/examples/styles/column_span.py"}
```

=== "column_span.py"

```py
--8<-- "docs/examples/styles/column_span.py"
```

=== "column_span.css"

```sass
--8<-- "docs/examples/styles/column_span.css"
```

CSS

column-span: 3

Python

widget.styles.column_span = 3