Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Fixed

- Fixed Footer's width calculation when docked to correctly respect margins https://github.com/Textualize/textual/issues/6616

## [8.2.8] - 2026-06-30

### Fixed
Expand Down
1 change: 1 addition & 0 deletions src/textual/widgets/_footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class Footer(ScrollableContainer, can_focus=False, can_focus_children=False):
background: $footer-background;
dock: bottom;
height: 1;
width: 100%;
scrollbar-size: 0 0;
&.-compact {
FooterLabel {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions tests/snapshot_tests/snapshot_apps/footer_margin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from textual.app import App, ComposeResult
from textual.widgets import Footer


class FooterMarginApp(App):
"""Regression test for https://github.com/Textualize/textual/issues/6616

Setting a margin on the Footer should shrink it on all sides. Previously
the Footer kept a fixed width, so the left/top margin created a gap but
the right margin had nowhere to go and was invisible."""

CSS = """
Screen {
background: blue;
}
"""

BINDINGS = [("q", "quit", "Quit")]

def compose(self) -> ComposeResult:
yield Footer()

def on_mount(self) -> None:
self.query_one(Footer).styles.margin = 5


if __name__ == "__main__":
app = FooterMarginApp()
app.run()
4 changes: 4 additions & 0 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ def test_datatable_change_cell_padding(snap_compare):
def test_footer_render(snap_compare):
assert snap_compare(WIDGET_EXAMPLES_DIR / "footer.py")

def test_footer_margin(snap_compare):
"""Regression test for https://github.com/Textualize/textual/issues/6616"""
assert snap_compare(SNAPSHOT_APPS_DIR / "footer_margin.py")


def test_header_render(snap_compare):
assert snap_compare(WIDGET_EXAMPLES_DIR / "header.py")

Expand Down