Ticket #26459: 26459.diff
File 26459.diff, 1.9 KB (added by , 11 years ago) |
---|
-
wp-admin/js/theme.js
250 250 this.activeTheme(); 251 251 // Set up navigation events 252 252 this.navigation(); 253 // Checks screenshot size 254 this.screenshotCheck( this.$el ); 253 255 }, 254 256 255 257 // Adds a class to the currently active theme … … 352 354 previousTheme: function() { 353 355 var self = this; 354 356 self.trigger( 'theme:previous', self.model.cid ); 357 }, 358 359 // Checks if the theme screenshot is the old 300px width version 360 // and adds a corresponding class if it's true 361 screenshotCheck: function( el ) { 362 var width; 363 // Wait until it's loaded... 364 el.find( '.screenshot img' ).on( 'load', function() { 365 width = el.find( '.screenshot img' ).css( 'width', 'auto' ).width(); 366 367 if ( width == 300 ) { 368 el.addClass( 'small-screenshot' ); 369 } 370 371 // Restore CSS value for width 372 el.find( '.screenshot img' ).css( 'width', '100%' ); 373 }); 355 374 } 356 375 }); 357 376 -
wp-admin/css/wp-admin.css
6894 6894 top: 0; 6895 6895 width: 100%; 6896 6896 } 6897 /* Handles old 300px screenshots */ 6898 .theme-overlay.small-screenshot .theme-screenshots { 6899 position: absolute; 6900 width: 302px; 6901 } 6902 .theme-overlay.small-screenshot .theme-info { 6903 margin-left: 350px; 6904 width: auto; 6905 } 6897 6906 6898 6907 /* Other screenshots, shown small and square */ 6899 6908 .theme-overlay .screenshot.thumb { … … 7162 7171 .theme-browser .theme .theme-actions { 7163 7172 padding: 5px 10px 4px 10px; 7164 7173 } 7174 .theme-overlay.small-screenshot .theme-screenshots { 7175 position: static; 7176 float: none; 7177 max-width: 302px; 7178 } 7179 .theme-overlay.small-screenshot .theme-info { 7180 margin-left: 0; 7181 width: auto; 7182 } 7165 7183 } 7166 7184 7167 7185 @media only screen and (max-width: 480px) {