[wp-trac] [WordPress Trac] #64269: Media Library Gallery "Remove" button styling
WordPress Trac
noreply at wordpress.org
Wed Nov 26 10:11:35 UTC 2025
#64269: Media Library Gallery "Remove" button styling
--------------------------+------------------------------
Reporter: maccyd | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by hbhalodia):
Hi @afercia @joedolson, There is a probable regression from the changeset
- https://core.trac.wordpress.org/changeset/60806 and specifically from
file - https://core.trac.wordpress.org/changeset/60806#file25, This have
updated the button structure to use the `media-modal-icon` in a span tag,
child of button. We may need to update/add the CSS code in media-views.css
to add the correct position of sprite image and target the media-modal-
icon instead of attachment-close button.
{{{#!css
.wp-core-ui .attachment-close {
display: block;
position: absolute;
top: 5px;
right: 5px;
height: 22px;
width: 22px;
padding: 0;
background-color: #fff;
border-radius: 3px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
transition: none;
}
.wp-core-ui .attachment-close .media-modal-icon {
display: inline-block;
background-position: -96px 4px;
height: 22px;
width: 22px;
}
.wp-core-ui .attachment-close:hover .media-modal-icon,
.wp-core-ui .attachment-close:focus .media-modal-icon {
background-position: -36px 4px;
},
}}}
Removed, `background-position` property from `.attachment-close` and
update it to `media-modal-icon` class with default and hover properties.
I am attaching a patch file for the same, which I tested and working as
expected without any regressions.
Can you please check as well?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64269#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list