Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#49237 closed enhancement (fixed)

Add hatched background to Image widget preview area

Reported by: bahia0019 Owned by: SergeyBiryukov
Priority: normal Milestone: 5.4
Component: Widgets Version: 5.4
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses: ui, administration

Description

In the Image widget, if you have a white logo with transparent areas (PNG or SVG), it's impossible to see the logo because the preview background is white.
I'm submitting a patch that creates a hatched area. It's the exact same CSS as the background area for the Media Library edit screen.

Attachments (1)

image-widget-bg.49237.diff (3.8 KB ) - added by bahia0019 7 years ago.
The pertinent changes start at line 15 with the class ".media-widget-control .media-widget-preview img". It appears Prettier has made some formatting changes to the CSS.

Download all attachments as: .zip

Change History (9)

@bahia0019
7 years ago

The pertinent changes start at line 15 with the class ".media-widget-control .media-widget-preview img". It appears Prettier has made some formatting changes to the CSS.

#1 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review5.4
  • Owner set to SergeyBiryukov
  • Status assignedreviewing

#2 @pikamander2
7 years ago

I know this should be a separate ticket, but I've seen similar issues happen when uploading transparent favicons, expect with those the background seems to appear black. That might be worth looking into as well at the same time.

#3 @davidbaumwald
7 years ago

@SergeyBiryukov Is this still doable for 5.4?

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


7 years ago

#5 @davidbaumwald
7 years ago

  • Milestone 5.4Future Release

This ticket still needs testing, and with 5.4 Beta 1 landing tomorrow, this is being moved to Future Release. If any maintainer or committer feels this can be included in 5.4 or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#7 @SergeyBiryukov
7 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 47257:

Media: Improve the preview of transparent images in Image widget by using CSS3 to show a checkered background.

Props bahia0019.
Fixes #49237.

#8 @SergeyBiryukov
7 years ago

  • Milestone Future Release5.4
Note: See TracTickets for help on using tickets.