Skip to content

Commit 88fc25c

Browse files
committed
allow CSS to override Markdown tables
1 parent 596c2a7 commit 88fc25c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/textual/widgets/_markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def __init__(self, headers: list[Content], rows: list[list[Content]]):
649649
def pre_layout(self, layout: Layout) -> None:
650650
assert isinstance(layout, GridLayout)
651651
layout.auto_minimum = True
652-
layout.expand = True
652+
layout.expand = not self.query_ancestor(MarkdownTable).styles.is_auto_width
653653
layout.shrink = True
654654
layout.stretch_height = True
655655

0 commit comments

Comments
 (0)