diff --git a/CHANGELOG.md b/CHANGELOG.md index 90e4cfb1a0..dc7242d4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 `Markdown.goto_anchor` no longer scrolling the heading into view https://github.com/Textualize/textual/pull/4583 + ## [0.63.6] - 2024-05-29 ### Fixed @@ -99,7 +105,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Dependency issue -## [0.60.0] - 2024-05-14 +## [0.60.0] - 2024-05-14 ### Fixed @@ -206,7 +212,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added `Size.with_width` and `Size.with_height` https://github.com/Textualize/textual/pull/4393 - + ### Fixed - Fixed issue with inline mode and multiple screens https://github.com/Textualize/textual/pull/4393 @@ -221,7 +227,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- Fixed mouse escape sequences being generated with `mouse=False` +- Fixed mouse escape sequences being generated with `mouse=False` ## [0.55.0] - 2024-04-1 diff --git a/src/textual/widgets/_markdown.py b/src/textual/widgets/_markdown.py index 26fda6e929..e5da42b23b 100644 --- a/src/textual/widgets/_markdown.py +++ b/src/textual/widgets/_markdown.py @@ -232,7 +232,7 @@ class MarkdownHeader(MarkdownBlock): MarkdownHeader { color: $text; margin: 2 0 1 0; - + } """ @@ -243,7 +243,7 @@ class MarkdownH1(MarkdownHeader): DEFAULT_CSS = """ MarkdownH1 { - content-align: center middle; + content-align: center middle; text-style: bold; color: $success; &:light {color: $primary;} @@ -260,7 +260,7 @@ class MarkdownH2(MarkdownHeader): text-style: underline; color: $success; &:light {color: $primary;} - + } """ @@ -270,7 +270,7 @@ class MarkdownH3(MarkdownHeader): DEFAULT_CSS = """ MarkdownH3 { - + text-style: bold; color: $success; &:light {color: $primary;} @@ -300,7 +300,7 @@ class MarkdownH5(MarkdownHeader): text-style: bold; color: $text; margin: 1 0; - + } """ @@ -493,8 +493,8 @@ class MarkdownTable(MarkdownBlock): DEFAULT_CSS = """ MarkdownTable { - width: 100%; - background: $panel; + width: 100%; + background: $panel; } """ @@ -597,11 +597,11 @@ class MarkdownFence(MarkdownBlock): margin: 1 0; overflow: auto; width: 100%; - height: auto; + height: auto; max-height: 20; color: rgb(210,210,210); - + } MarkdownFence > * { @@ -839,7 +839,7 @@ def goto_anchor(self, anchor: str) -> bool: unique = TrackedSlugs() for _, title, header_id in self._table_of_contents: if unique.slug(title) == anchor: - self.parent.scroll_to_widget(self.query_one(f"#{header_id}"), top=True) + self.query_one(f"#{header_id}").scroll_visible(top=True) return True return False