From 240c8bc1adf75f0087503298ffc5cd732d95944f Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 30 Jul 2026 01:03:36 +0000 Subject: Clamp WordPress caption wrappers so inline images stay in-column img { max-width: 100% } only bounded the itself; a WordPress
wrapper sized for the source site's column was left unconstrained, so the wrapper (and the image filling it) overflowed the reader's own narrower column. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017Zwte3cyUJFUVycc3sDmjM --- app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt') diff --git a/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt b/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt index 1fd2411..e69dd9b 100644 --- a/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt +++ b/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt @@ -126,6 +126,13 @@ fun wrapReaderHtml(bodyContent: String, title: String? = null): String = """ a { color: #8ab4f8; } img { max-width: 100%; height: auto; } svg { max-width: 100%; } + /* WordPress captioned images (
, or the + older
) carry a fixed pixel width inline on + the wrapper itself, sized for the source site's wider column. Our img rule above only + clamps the , which then just fills that oversized wrapper -- so the wrapper (and + the image with it) blows past the reader's own column edge on a narrow screen. Clamp + the wrapper too; max-width still wins over the inline width per the CSS box model. */ + figure, .wp-caption { max-width: 100%; box-sizing: border-box; } /* A decorative icon (section badge, share glyph, etc.) that slipped through extraction relies on the source site's own stylesheet for its real display size (commonly Tailwind classes like "h-5 w-5") -- which we don't load here. -- cgit v1.2.3