-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Checked closed issues — no duplicates found. Running latest Textual (7.5.0).
The bug
Markdown list items render with extra blank lines between them when a Horizontal container (with a child) is a sibling in a CSS grid that has both explicit grid-columns and grid-rows.
Expected: compact list — no blank lines between bullet items.
Actual: blank line between items.
Minimal reproduction
from textual.app import App, ComposeResult
from textual.containers import Horizontal
from textual.widgets import Markdown, Static
MD = "- one\n- two\n- three\n- four\n- five"
class BugDemo(App):
CSS = \"\"\"
Screen {
layout: grid;
grid-size: 2 2;
grid-columns: 1fr 1fr;
grid-rows: 1fr 1fr;
}
Horizontal { height: 1fr; }
\"\"\"
BINDINGS = [("q", "quit")]
def compose(self) -> ComposeResult:
yield Markdown(MD)
yield Horizontal(Static("hi"))
BugDemo().run()Output
• one hi
• two
• three
• four
• five
Trigger conditions (all required)
- CSS grid with both
grid-columnsandgrid-rowsset Markdownas a direct grid childHorizontalwith a child widget as a sibling grid child
Any of these make the list render correctly
- Remove
grid-columnsorgrid-rows - Replace
HorizontalwithVertical - Use an empty
Horizontal()
Textual Diagnostics
Versions
| Name | Value |
|---|---|
| Textual | 7.5.0 |
| Rich | 14.3.2 |
Python
| Name | Value |
|---|---|
| Version | 3.13.9 |
| Implementation | CPython |
Operating System
| Name | Value |
|---|---|
| System | Darwin |
| Release | 25.3.0 |
Terminal
| Name | Value |
|---|---|
| Terminal Application | ghostty (1.2.3) |
| TERM | xterm-ghostty |
| COLORTERM | truecolor |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels