From b4e9d5a125a14da2e4b7df4b07b84fe4235c2a12 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 22 Sep 2017 19:56:14 +0000 Subject: [PATCH] Media: Improve the preview of transparent images in Attachment Details modal by using CSS3 to show a checkered background. Props powerzilly, stevepuddick. Fixes #41948. git-svn-id: https://develop.svn.wordpress.org/trunk@41569 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index e629aa8e7b..bfb7f67951 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -746,6 +746,9 @@ border color while dragging a file over the uploader drop area */ max-width: 100%; max-height: 90%; max-height: calc( 100% - 42px ); /* leave space for actions underneath */ + background-image: linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4); + background-position: 0 0, 10px 10px; + background-size: 20px 20px; } .edit-attachment-frame .attachment-media-view .attachment-actions {