diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css index a95310b4d6..766ada5a29 100644 --- a/wp-includes/css/media-views.css +++ b/wp-includes/css/media-views.css @@ -273,21 +273,13 @@ 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. */ .attachment .icon { top: 50%; left: 50%; } -.attachment-preview:after { +.attachment-preview .thumbnail:after { content: ''; display: block; position: absolute; @@ -304,8 +296,21 @@ 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 .thumbnail img { +.attachment .thumbnail .centered img { -webkit-transform: translate( -50%, -50% ); -moz-transform: translate( -50%, -50% ); -ms-transform: translate( -50%, -50% ); diff --git a/wp-includes/media.php b/wp-includes/media.php index 44e3db0892..fd2e754e69 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1327,7 +1327,9 @@ function wp_print_media_templates( $attachment ) {
<% } else if ( 'image' === type ) { %>
- +
+ +
<% } else { %>