Better responsive CSS for post format switcher. Remove some JS debug cruft. props wonderboymusic. see #24046.

git-svn-id: https://develop.svn.wordpress.org/trunk@24114 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2013-04-26 23:47:21 +00:00
parent 74a535db1c
commit 64ed933919
2 changed files with 4 additions and 11 deletions

View File

@ -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;
}

View File

@ -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 );