From e0a32fe27b07d44bf2131eef997f62de9c61085c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 27 Nov 2012 15:58:47 +0000 Subject: [PATCH] Fix overflow of long filenames in the media modal. Props koopersmith, GregLone fixes #22554 git-svn-id: https://develop.svn.wordpress.org/trunk@22870 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/css/media-views.css | 11 +++++++++-- wp-includes/media.php | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/wp-includes/css/media-views.css b/wp-includes/css/media-views.css index 23fc5f21cc..5b9a023a2e 100644 --- a/wp-includes/css/media-views.css +++ b/wp-includes/css/media-views.css @@ -569,11 +569,18 @@ a.media-modal-close { left: 0; right: 0; bottom: 0; - padding: 5px 10px; + overflow: hidden; + max-height: 100%; + + word-wrap: break-word; text-align: center; font-weight: bold; background: rgba( 255, 255, 255, 0.8 ); - box-shadow: 0 0 2px rgba( 0, 0, 0, 0.2 ); + box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 ); +} + +.attachment .filename div { + padding: 5px 10px; } .attachment-preview .thumbnail { diff --git a/wp-includes/media.php b/wp-includes/media.php index d2f09bd216..878941ebbe 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1600,7 +1600,9 @@ function wp_print_media_templates( $attachment ) { <# } else { #> -
{{ data.filename }}
+
+
{{ data.filename }}
+
<# } #> <# if ( data.buttons.close ) { #>