From 8229e31f4f5ec31a82fc0158f767035cd2ffbfdf Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 13 Jan 2025 08:07:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=84=20Modernises=20table=20view=20?= =?UTF-8?q?styling.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/Article Rendering/stylesheet.css | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Shared/Article Rendering/stylesheet.css b/Shared/Article Rendering/stylesheet.css index 05daa76fa..9b12fcc44 100644 --- a/Shared/Article Rendering/stylesheet.css +++ b/Shared/Article Rendering/stylesheet.css @@ -205,8 +205,8 @@ pre code { .nnw-overflow table { margin-bottom: 1px; border-spacing: 0; - border: 1px solid var(--secondary-accent-color); font-size: inherit; + border-collapse: collapse; } .nnw-overflow table table { @@ -220,7 +220,9 @@ pre code { border: 1px solid var(--table-cell-border-color); border-top: none; border-left: none; - padding: 5px; + border-right: none; + padding: 8px 11px; + text-align: left; } .nnw-overflow tr :matches(td, th):last-child { @@ -444,10 +446,6 @@ a.footnote:hover, padding: 5px; } - .nnw-overflow table { - border: 1px solid var(--secondary-accent-color); - } - } /* macOS Specific */ @@ -518,7 +516,4 @@ a.footnote:hover, padding: 10px; } - .nnw-overflow table { - border: 1px solid var(--accent-color); - } } From c44bdbed468ce7de814136cce8e5665c72b3db3a Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 13 Jan 2025 12:16:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Fixes=20#4483=20=20?= =?UTF-8?q?by=20showing=20bars=20on=20rotation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On rotation, if the device is a .phone and it is transitioning to a `.regular` horizontal size class—it’s big—bars in the article view are surfaced to workaround a crash. This doesn’t affect behaviour on smaller iPhones or iPads. --- iOS/Article/ArticleViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index ae6e73837..055c54849 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -189,6 +189,14 @@ class ArticleViewController: UIViewController { view.layoutIfNeeded() } + override func willTransition(to newCollection: UITraitCollection, with coordinator: any UIViewControllerTransitionCoordinator) { + // We only want to show bars when rotating to horizontalSizeClass == .regular + // (i.e., big) iPhones to resolve crash #4483. + if UIDevice.current.userInterfaceIdiom == .phone && newCollection.horizontalSizeClass == .regular { + currentWebViewController?.showBars() + } + } + func updateUI() { guard let article = article else {