summaryrefslogtreecommitdiff
path: root/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt')
-rw-r--r--app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt10
1 files changed, 10 insertions, 0 deletions
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 42a15f0..503f71e 100644
--- a/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt
+++ b/app/src/main/java/org/terst/feedreader/ui/ReaderWebView.kt
@@ -38,6 +38,16 @@ fun wrapReaderHtml(bodyContent: String): String = """
background-color: #121212; color: #e1e1e1; }
a { color: #8ab4f8; }
img { max-width: 100%; height: auto; }
+ svg { max-width: 100%; }
+ /* 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.
+ An <svg> with no explicit width/height falls back to the browser's default
+ (much larger than any inline icon is meant to be, confirmed live: Ars
+ Technica's per-article section-badge icon rendering "giant"). One WITH
+ explicit width/height was deliberately sized by the page itself, so leave
+ those alone -- just cap the ones that would otherwise size themselves. */
+ svg:not([width]):not([height]) { max-width: 32px; max-height: 32px; }
</style></head>
<body>$bodyContent</body></html>
""".trimIndent()