From 4885096f98de68133dfbc49af0e56eb2ee0f69b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Fri, 26 Apr 2013 23:47:21 +0000 Subject: [PATCH] Better responsive CSS for post format switcher. Remove some JS debug cruft. props wonderboymusic. see #24046. git-svn-id: http://core.svn.wordpress.org/trunk@24114 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/wp-admin.css | 11 ++++------- wp-admin/js/post-formats.js | 4 ---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 3265e3004e..7712dd0193 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -4111,13 +4111,14 @@ body .ui-tooltip { border-color: #CCC; margin: 13px 0 10px; padding: 5px; + overflow: hidden; } .post-format-options a { - display: inline-block; + float: left; min-width: 62px; - padding:5px; - border:1px solid transparent; + padding: 5px; + border: 1px solid transparent; margin-right: 10px; position: relative; text-decoration: none; @@ -4208,10 +4209,6 @@ body .ui-tooltip { } @media only screen and (max-width: 782px) { - .post-format-options { - height: 33px; - } - .post-format-options a { margin-right: 19px; } diff --git a/wp-admin/js/post-formats.js b/wp-admin/js/post-formats.js index 6df8aa6838..4ec2813add 100644 --- a/wp-admin/js/post-formats.js +++ b/wp-admin/js/post-formats.js @@ -81,21 +81,17 @@ window.wp = window.wp || {}; formatTo = -1 < $.inArray( format, noUIFormats ); formatFrom = -1 < $.inArray( postFormats.currentPostFormat, noUIFormats ); if ( formatTo && formatFrom ) { // To/from have no UI. No slide. - console.log( 'both no UI' ); switchFormatClass( format ); fields.hide(); } else if ( formatFrom ) { // Only destination has UI. Slide down. - console.log( 'destination only' ); fields.hide(); switchFormatClass( format ); fields.slideDown( 400 ); } else if ( formatTo ) { // Only source has UI. Slide up. - console.log( 'source only' ); fields.slideUp( 200, function(){ switchFormatClass( format ); }); } else { // Both have UI. Slide both ways. - console.log( 'both' ); fields.slideUp( 200, function(){ switchFormatClass( format ); fields.slideDown( 400 );