WordPress.org

Make WordPress Core

Opened 6 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#49237 closed enhancement (fixed)

Add hatched background to Image widget preview area

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

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 6 weeks 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
6 weeks 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
6 weeks ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from assigned to reviewing

#2 @pikamander2
6 weeks 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
3 weeks ago

@SergeyBiryukov Is this still doable for 5.4?

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


2 weeks ago

#5 @davidbaumwald
2 weeks ago

  • Milestone changed from 5.4 to Future 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
2 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

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
2 weeks ago

  • Milestone changed from Future Release to 5.4
Note: See TracTickets for help on using tickets.