Make WordPress Core

Changeset 29489


Ignore:
Timestamp:
08/14/2014 07:17:27 AM (12 years ago)
Author:
helen
Message:

Media grid bulk selection styling:

  • Fade content within each attachment item so that focus styling is still clear.
  • Less jarring toolbar pinning.
  • Tighten up the fade in/out transition.

see #28842.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/media-views.css

    r29484 r29489  
    730730        -moz-box-sizing: border-box;
    731731        box-sizing: border-box;
    732         opacity: 1;
    733         -webkit-transition: opacity 250ms;
    734         transition: opacity 250ms;
    735 }
    736 
    737 .media-frame.mode-select .attachment {
    738         opacity: 0.65;
    739 }
    740 
    741 .media-frame.mode-select .attachment.selected {
    742         opacity: 1;
    743732}
    744733
     
    755744.media-frame.mode-grid .attachment:focus {
    756745        -webkit-box-shadow:
    757                 inset 0 0 0 6px #f1f1f1,
     746                inset 0 0 0 5px #f1f1f1,
    758747                inset 0 0 1px 7px #5b9dd9;
    759748        box-shadow:
    760                 inset 0 0 0 6px #f1f1f1,
     749                inset 0 0 0 5px #f1f1f1,
    761750                inset 0 0 1px 7px #5b9dd9;
    762751}
     
    773762.media-frame.mode-grid .selected.attachment {
    774763        -webkit-box-shadow:
    775                 inset 0 0 0 6px #f1f1f1,
     764                inset 0 0 0 5px #f1f1f1,
    776765                inset 0 0 0 7px #ccc;
    777766        box-shadow:
    778                 inset 0 0 0 6px #f1f1f1,
     767                inset 0 0 0 5px #f1f1f1,
    779768                inset 0 0 0 7px #ccc;
    780769}
     
    810799        bottom: 0;
    811800        left: 0;
     801        opacity: 1;
     802        -webkit-transition: opacity .1s;
     803        transition: opacity .1s;
     804}
     805
     806.media-frame.mode-select .attachment .thumbnail {
     807        opacity: 0.65;
     808}
     809
     810.media-frame.mode-select .attachment.selected .thumbnail {
     811        opacity: 1;
    812812}
    813813
     
    25192519.media-frame.mode-select .attachments {
    25202520        padding: 2px;
     2521}
     2522
     2523.media-frame.mode-select .attachments-browser.fixed .attachments {
     2524        position: relative;
     2525        top: 80px; /* prevent jumping up when the toolbar becomes fixed */
     2526        padding-bottom: 80px; /* offset for above so the bottom doesn't get cut off */
    25212527}
    25222528
     
    25442550}
    25452551
    2546 .media-frame.mode-select .attachments-browser .media-toolbar.fixed {
     2552.media-frame.mode-select .attachments-browser.fixed .media-toolbar {
    25472553        position: fixed;
    2548         top: 28px;
    2549         left: 182px;
     2554        top: 12px;
     2555        left: auto;
    25502556        right: 20px;
    2551         width: auto;
    25522557}
    25532558
  • trunk/src/wp-includes/js/media-grid.js

    r29485 r29489  
    152152
    153153                fixPosition: function() {
    154                         var $browser;
     154                        var $browser, $toolbar;
    155155                        if ( ! this.isModeActive( 'select' ) ) {
    156156                                return;
     
    158158
    159159                        $browser = this.$('.attachments-browser');
     160                        $toolbar = $browser.find('.media-toolbar')
    160161
    161162                        if ( $browser.offset().top < this.$window.scrollTop() + this.$adminBar.height() ) {
    162                                 $browser.find('.media-toolbar').addClass( 'fixed' );
     163                                $browser.addClass( 'fixed' );
     164                                $toolbar.css('width', $browser.width() + 'px');
    163165                        } else {
    164                                 $browser.find('.media-toolbar').removeClass( 'fixed' );
     166                                $browser.removeClass( 'fixed' );
     167                                $toolbar.css('width', '');
    165168                        }
    166169                },
     
    595598                        } else {
    596599                                this.model.set( 'text', l10n.bulkSelect );
     600                                this.controller.content.get().$el.removeClass('fixed');
     601                                toolbar.$el.css('width', '');
    597602                                toolbar.$( '.delete-selected-button' ).addClass( 'hidden' );
    598603                                children.not( '.spinner, .delete-selected-button' ).show();
Note: See TracChangeset for help on using the changeset viewer.