Repository navigation
Themes: Windows contrast themes and Reduce Transparency on every platform - #322
Merged
Merged
Conversation
…form Forced colours (Windows' contrast themes, in the Windows app's WebView2 and every Windows browser) drops shadows and fills, which is how many controls show focus and state. A block at the end of style.css restates them as outlines in system colours (keyboard focus, the composer, the open conversation, selected segments, mentions, badges), takes the ps scene out of the page and stops its frame loop, and drops every blur. Reduce Transparency becomes html[data-reduce-transparency], like Reduce Motion: WebKit has no prefers-reduced-transparency, so ps.css's and macos.css's media blocks never applied on iOS, macOS or Linux. The query still sets it where Chromium has it; the iOS and macOS shells report the system setting and its changes through a Transparency plugin.
Under forced colours, what is chosen (a selected segment or tab, the context-menu row or completion the arrow keys reached) takes the system's selection colours, and the keyboard focus is a ring outside the control, so a focus on a selected segment still shows; the marks are sized in rem. In the Android app, the shell's live high-contrast report stands for Reduce Transparency, which Chromium derives from it and WebView reads only at startup. A change the Apple shell reports outranks its startup status reply. The media toolbar, the Mac image viewer and ps's user-list headings go solid too. The scenario checks the menu's active row and the sidebar's opaque fill; the docs say which browsers see the setting.
A selected tab's own button (Settings, Oper) takes the selection's text colour, not the theme's. Under Reduce Transparency the toolbar over an image or video is on black at full opacity, and an audio preview's keeps the row it sits on. A change the Android shell reports outranks its startup status reply. The scenario checks the selected Settings tab's label; the docs name the engines that see the setting.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 3 of the theme-structure review.
What changes
style.css:themeScene.tsstops its frame loop too;HighlightwithHighlightText;html[data-reduce-transparency](helpers/systemAccessibility.ts), next to the motion and contrast attributes.prefers-reduced-transparency; the Android app follows the system's high-contrast text as well.Transparency, fromSeancePlugin.swiftandBridge.swift. A change outranks a late startup reply.Verification
pnpm testpasses (lint, typecheck, mocha).test/themes/ps.tsnow:tools/scenarios/forced-colors.mjs, new, passes in Chromium (11 checks). Under ps it checks:swift build, and a full macOS app build;xcodebuildfor the Simulator and for a device.Not done
test/themes/ps.tschecks the reduced-transparency rules by selector, not declaration by declaration.