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
This commit is contained in:
parent
4a6b6963eb
commit
4885096f98
|
@ -4111,10 +4111,11 @@ 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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue