From 5c928c9c0e48319811ec7582a972fe4387a2ba6b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 4 Oct 2017 18:34:44 +0000 Subject: [PATCH] Media: Improve the preview of transparent images in Edit Image modal by using CSS3 to show a checkered background. Props powerzilly, stevepuddick. Fixes #41966. See #41948. git-svn-id: https://develop.svn.wordpress.org/trunk@41742 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 0f1e478901..95e52acd82 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -992,6 +992,12 @@ border color while dragging a file over the uploader drop area */ position: relative; } +.imgedit-crop-wrap img { + 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; +} + .imgedit-crop { margin: 0 8px 0 0; }