From 324470e39b0d4539a7487c2144157d686f5d0906 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Mon, 19 Jun 2023 11:55:10 +0200 Subject: [PATCH] Give embedded image files with transparency a checkered background Summary: Have a consistent rendering experience between File page and file embedded in a task for PNG image files with an alpha channel: Show a checkered background on the embedded image instead of a white background; show full contrast when hovering over the embedded image. Closes T15473 Test Plan: See steps in T15473 - compare an image file embedded in a task before and after applying this patch. - test in Task description - test in Task comment - test in Task comment inside something weird like a table Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15473 Differential Revision: https://we.phorge.it/D25294 --- resources/celerity/map.php | 6 +++--- webroot/rsrc/css/phui/phui-property-list-view.css | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index a7b8a41aa3..277db4a5b7 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => '76ed87e3', 'conpherence.pkg.js' => '020aebcf', - 'core.pkg.css' => 'f3d35ae0', + 'core.pkg.css' => '8abf4250', 'core.pkg.js' => '2eeda9e0', 'dark-console.pkg.js' => '187792c2', 'differential.pkg.css' => '525f9a1d', @@ -172,7 +172,7 @@ return array( 'rsrc/css/phui/phui-pager.css' => 'd022c7ad', 'rsrc/css/phui/phui-pinboard-view.css' => '1f08f5d8', 'rsrc/css/phui/phui-policy-section-view.css' => '139fdc64', - 'rsrc/css/phui/phui-property-list-view.css' => '5adf7078', + 'rsrc/css/phui/phui-property-list-view.css' => '118db252', 'rsrc/css/phui/phui-remarkup-preview.css' => '91767007', 'rsrc/css/phui/phui-segment-bar-view.css' => '5166b370', 'rsrc/css/phui/phui-spacing.css' => 'b05cadc3', @@ -875,7 +875,7 @@ return array( 'phui-pager-css' => 'd022c7ad', 'phui-pinboard-view-css' => '1f08f5d8', 'phui-policy-section-view-css' => '139fdc64', - 'phui-property-list-view-css' => '5adf7078', + 'phui-property-list-view-css' => '118db252', 'phui-remarkup-preview-css' => '91767007', 'phui-segment-bar-view-css' => '5166b370', 'phui-spacing-css' => 'b05cadc3', diff --git a/webroot/rsrc/css/phui/phui-property-list-view.css b/webroot/rsrc/css/phui/phui-property-list-view.css index 4d2cbc9b50..93388c3d7c 100644 --- a/webroot/rsrc/css/phui/phui-property-list-view.css +++ b/webroot/rsrc/css/phui/phui-property-list-view.css @@ -204,13 +204,15 @@ div.phui-property-list-stacked .phui-property-list-properties } -.document-engine-image img { +.document-engine-image img, +.phabricator-remarkup-embed-image img { margin: 20px auto; background: url('/rsrc/image/checker_light.png'); max-width: 100%; } -.device-desktop .document-engine-image img:hover { +.device-desktop .document-engine-image img:hover, +.device-desktop .phabricator-remarkup-embed-image img:hover { background: url('/rsrc/image/checker_dark.png'); }