Make WordPress Core

Ticket #38651: 38651.6.diff

File 38651.6.diff, 4.9 KB (added by sirbrillig, 8 years ago)

Update patch to remove left guard and add tweaks for twentyfourteen and twentyseventeen

  • src/wp-content/themes/twentyfourteen/style.css

    diff --git src/wp-content/themes/twentyfourteen/style.css src/wp-content/themes/twentyfourteen/style.css
    index d5c2c2f..e58234b 100644
    a.post-thumbnail:hover { 
    30983098        width: device-width;
    30993099}
    31003100
     3101@media screen and (max-width:800px) {
     3102        .site-header .site-title {
     3103                padding-left: 8px;
     3104        }
     3105
     3106        .site-header .customize-partial-edit-shortcut button {
     3107                top: 10px;
     3108        }
     3109}
     3110
     3111
    31013112@media screen and (max-width: 400px) {
    31023113        .list-view .site-content .post-thumbnail {
    31033114                background: none;
    a.post-thumbnail:hover { 
    31723183        }
    31733184}
    31743185
     3186@media screen and (max-width:320px) {
     3187        .site-header .customize-partial-edit-shortcut button {
     3188                left: -32px;
     3189        }
     3190
     3191        .site-header .site-title {
     3192                padding-left: 28px;
     3193        }
     3194}
     3195
    31753196@media screen and (min-width: 401px) {
    31763197        a.post-thumbnail:hover img {
    31773198                opacity: 0.85;
  • src/wp-content/themes/twentyseventeen/style.css

    diff --git src/wp-content/themes/twentyseventeen/style.css src/wp-content/themes/twentyseventeen/style.css
    index 05dec3b..f1ec573 100644
    object { 
    30663066## Media Queries
    30673067--------------------------------------------------------------*/
    30683068
     3069@media screen and (min-width: 20em) {
     3070        .site-header .site-title {
     3071                padding-left: 0;
     3072        }
     3073}
     3074
    30693075@media screen and (min-width: 30em) {
    30703076
    30713077        /* Typography */
  • src/wp-includes/css/customize-preview.css

    diff --git src/wp-includes/css/customize-preview.css src/wp-includes/css/customize-preview.css
    index c245d25..daa41be 100644
     
    3535        border: 1px solid #0085ba;
    3636}
    3737
    38 /* Styles for the actual shortcut */
     38/**
     39 * Styles for the actual shortcut
     40 *
     41 * Note that some properties are overly verbose to prevent theme interference.
     42 */
    3943.widget .customize-partial-edit-shortcut button,
    4044.customize-partial-edit-shortcut button {
    4145        position: absolute;
    42         left: -36px;
     46        left: -30px;
     47        top: 2px;
    4348        color: #fff;
    4449        width: 30px;
    4550        height: 30px;
    body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut bu 
    101106        visibility: hidden;
    102107}
    103108
    104 .customize-partial-edit-shortcut-left-margin.customize-partial-edit-shortcut button {
    105         left: 0;
    106 }
    107 
    108109@-webkit-keyframes customize-partial-edit-shortcut-bounce-appear {
    109110        from, 20%, 40%, 60%, 80%, to {
    110111                -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut bu 
    242243}
    243244
    244245@media screen and (max-width:800px) {
     246        .widget .customize-partial-edit-shortcut button,
     247        .customize-partial-edit-shortcut button {
     248                left: -32px;
     249        }
     250}
     251
     252@media screen and (max-width:320px) {
     253        .site-title { padding-left: 10px; }
     254
     255        .widget-area .widget {
     256                padding-left: 10px;
     257        }
     258
     259        .widget .customize-partial-edit-shortcut button,
    245260        .customize-partial-edit-shortcut button {
    246                 left: -18px; /* Assume there will be less of a margin available on smaller screens */
     261                left: -30px;
    247262        }
    248263}
  • src/wp-includes/js/customize-selective-refresh.js

    diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
    index 70e2b96..4355f2d 100644
    wp.customize.selectiveRefresh = ( function( $, api ) { 
    118118                                return;
    119119                        }
    120120                        $shortcut = partial.createEditShortcut();
    121                         partial.positionEditShortcut( placement, $shortcut );
     121                        partial.addEditShortcutToPlacement( placement, $shortcut );
    122122                        $shortcut.on( 'click', function( event ) {
    123123                                event.preventDefault();
    124124                                event.stopPropagation();
    wp.customize.selectiveRefresh = ( function( $, api ) { 
    127127                },
    128128
    129129                /**
    130                  * Position an edit shortcut for the placement container.
    131                  *
    132                  * The shortcut must already be created and added to the page.
     130                 * Add an edit shortcut to the placement container.
    133131                 *
    134132                 * @since 4.7
    135133                 *
    wp.customize.selectiveRefresh = ( function( $, api ) { 
    137135                 * @param {jQuery} $editShortcut The shortcut element as a jQuery object.
    138136                 * @returns {void}
    139137                 */
    140                 positionEditShortcut: function( placement, $editShortcut ) {
    141                         var $placementContainer = $( placement.container ), $editButton;
    142                         $placementContainer.prepend( $editShortcut );
     138                addEditShortcutToPlacement: function( placement, $editShortcut ) {
     139                        var $placementContainer = $( placement.container );
     140                        if ( ! $editShortcut.addedToPlacement ) {
     141                                $placementContainer.prepend( $editShortcut );
     142                                $editShortcut.addedToPlacement = true;
     143                        }
    143144                        if ( ! $placementContainer.is( ':visible' ) || 'none' === $placementContainer.css( 'display' ) ) {
    144145                                $editShortcut.addClass( 'customize-partial-edit-shortcut-hidden' );
    145146                        }
    146                         $editButton = $editShortcut.find( 'button' );
    147                         $editShortcut.toggleClass( 'customize-partial-edit-shortcut-left-margin', $editButton.offset().left < 2 );
    148147                },
    149148
    150149                /**