From 74b5a64b3b8aafe85a4849ffe48d66e5b8cf1518 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sat, 12 Jul 2025 19:33:48 +0200 Subject: [PATCH] Hardcode text color of unexpected AphrontWebpageResponse output Summary: In dark mode, the current `text-shadow` of a potentially displayed unexpected response output offers a nice fuzzy feeling and is a great alternative to the consumption of beverages. Variables like `{whitetext}` won't work here as it is a PHP file and not CSS. We could introduce a new CSS selector, or remove the text-shadow, or simply hardcode the currently implicit text color (taken from `body`) to black. As there is also a custom background color gradient which does not change either between dark mode and default mode, let's just hardcode the text color. Refs T15056 Test Plan: * Go to http://phorge.localhost/settings/panel/display/ and set `Accessibility` to `Dark Mode (Experimental)` * In `src/aphront/response/AphrontWebpageResponse::buildResponseString()`, override `$unexpected_output` with a custom string * Go to http://phorge.localhost/ and look at the top of the page Reviewers: O1 Blessed Committers, mainframe98 Reviewed By: O1 Blessed Committers, mainframe98 Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15056 Differential Revision: https://we.phorge.it/D26152 --- src/aphront/response/AphrontWebpageResponse.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aphront/response/AphrontWebpageResponse.php b/src/aphront/response/AphrontWebpageResponse.php index 00a953ece8..75e26d2fd9 100644 --- a/src/aphront/response/AphrontWebpageResponse.php +++ b/src/aphront/response/AphrontWebpageResponse.php @@ -29,6 +29,7 @@ final class AphrontWebpageResponse extends AphrontHTMLResponse { 'position: relative;', 'padding: 16px;', 'font-family: monospace;', + 'color: black;', 'text-shadow: 1px 1px 1px white;', ); -- 2.51.2