Fix positioning of attachment thumbnail overlays.
Prevents the overlay from blocking buttons inside the attachment preview, such as the remove button in the gallery editor. see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
90888aaebd
commit
80cd7ad468
@ -273,21 +273,13 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment .thumbnail {
|
|
||||||
-webkit-transform: translate( 50%, 50% );
|
|
||||||
-moz-transform: translate( 50%, 50% );
|
|
||||||
-ms-transform: translate( 50%, 50% );
|
|
||||||
-o-transform: translate( 50%, 50% );
|
|
||||||
transform: translate( 50%, 50% );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Vertically center the icons. */
|
/* Vertically center the icons. */
|
||||||
.attachment .icon {
|
.attachment .icon {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-preview:after {
|
.attachment-preview .thumbnail:after {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -304,8 +296,21 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attachment .thumbnail .centered {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
-webkit-transform: translate( 50%, 50% );
|
||||||
|
-moz-transform: translate( 50%, 50% );
|
||||||
|
-ms-transform: translate( 50%, 50% );
|
||||||
|
-o-transform: translate( 50%, 50% );
|
||||||
|
transform: translate( 50%, 50% );
|
||||||
|
}
|
||||||
|
|
||||||
.attachment .icon,
|
.attachment .icon,
|
||||||
.attachment .thumbnail img {
|
.attachment .thumbnail .centered img {
|
||||||
-webkit-transform: translate( -50%, -50% );
|
-webkit-transform: translate( -50%, -50% );
|
||||||
-moz-transform: translate( -50%, -50% );
|
-moz-transform: translate( -50%, -50% );
|
||||||
-ms-transform: translate( -50%, -50% );
|
-ms-transform: translate( -50%, -50% );
|
||||||
|
@ -1327,8 +1327,10 @@ function wp_print_media_templates( $attachment ) {
|
|||||||
<div class="media-progress-bar"><div></div></div>
|
<div class="media-progress-bar"><div></div></div>
|
||||||
<% } else if ( 'image' === type ) { %>
|
<% } else if ( 'image' === type ) { %>
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
|
<div class="centered">
|
||||||
<img src="<%- url %>" draggable="false" />
|
<img src="<%- url %>" draggable="false" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<img src="<%- icon %>" class="icon" draggable="false" />
|
<img src="<%- icon %>" class="icon" draggable="false" />
|
||||||
<div class="filename"><%- filename %></div>
|
<div class="filename"><%- filename %></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user