mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
setAlgorithmicDarkeningAllowed(true) was added to force-darken pages that don't implement prefers-color-scheme. Combined with nightThemedContext (which forces the embed WebView's isLightTheme=false), it now also runs on pages that are ALREADY dark but don't declare CSS color-scheme support — e.g. ditto.pub, which ships <html class="dark"> by default — and algorithmically inverts their nav bars to light, leaving "dark content, light bars". prefers-color-scheme: dark is driven by isLightTheme (nightThemedContext) INDEPENDENTLY of algorithmic darkening — device-verified: embedded pages still report prefersDark=true with darkening off — so dropping it keeps real dark-aware sites dark while no longer corrupting dark-by-default ones. The trade-off (a site with no dark mode of its own renders light instead of being force-inverted) matches how a real mobile browser behaves. Removed from all four embed/host WebView configs (browser + nsite/napplet, embedded + full-screen) along with the now-unused WebSettingsCompat import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>