WordPress.org

Make WordPress Core

Ticket #38532: 38532.4.diff

File 38532.4.diff, 6.6 KB (added by sirbrillig, 3 years ago)

Update patch to fix recent conflicts

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

    diff --git src/wp-content/themes/twentyfourteen/style.css src/wp-content/themes/twentyfourteen/style.css
    index 72b320f..d5c2c2f 100644
    span + .edit-link:before, 
    10451045        outline: 1px dotted;
    10461046}
    10471047
    1048 .secondary-navigation .customize-partial-edit-shortcut:before,
    1049 .footer-sidebar .widget:first-child .customize-partial-edit-shortcut:before {
     1048.secondary-navigation .customize-partial-edit-shortcut button,
     1049.footer-sidebar .widget:first-child .customize-partial-edit-shortcut button {
    10501050        left: 0;
    10511051}
    10521052
  • src/wp-content/themes/twentyseventeen/inc/color-patterns.php

    diff --git src/wp-content/themes/twentyseventeen/inc/color-patterns.php src/wp-content/themes/twentyseventeen/inc/color-patterns.php
    index d14e0b1..0a20a03 100644
    body.colors-custom, 
    317317.colors-custom .next.page-numbers:hover,
    318318.colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover,
    319319.colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus,
    320 .colors-custom .customize-partial-edit-shortcut:before {
     320.colors-custom .customize-partial-edit-shortcut button {
    321321        background: hsl( ' . esc_attr( $hue ) . ', ' . esc_attr( $saturation ) . ', 46% ); /* base: #767676; */
    322322}
    323323
  • src/wp-content/themes/twentyseventeen/style.css

    diff --git src/wp-content/themes/twentyseventeen/style.css src/wp-content/themes/twentyseventeen/style.css
    index acd1b61..8489fe1 100644
    object { 
    29732973}
    29742974
    29752975/* Add some space around the visual edit shortcut buttons. */
    2976 .twentyseventeen-panel .customize-partial-edit-shortcut:before {
     2976.twentyseventeen-panel .customize-partial-edit-shortcut button {
    29772977        top: 30px;
    29782978        left: 30px;
    29792979}
    object { 
    29892989}
    29902990
    29912991/* Prevent icon colors from clashing with color schemes. */
    2992 .colors-custom .customize-partial-edit-shortcut:before {
     2992.colors-custom .customize-partial-edit-shortcut button {
    29932993        text-shadow: 0 -1px 1px rgba(0,0,0,.2),
    29942994                     1px 0 1px rgba(0,0,0,.2),
    29952995                     0 1px 1px rgba(0,0,0,.2),
  • src/wp-includes/css/customize-preview.css

    diff --git src/wp-includes/css/customize-preview.css src/wp-includes/css/customize-preview.css
    index fee3b7b..4a67587 100644
     
    1212}
    1313
    1414/* Make shortcut buttons essentially invisible */
    15 .widget button.customize-partial-edit-shortcut,
     15.widget .customize-partial-edit-shortcut,
    1616.customize-partial-edit-shortcut {
    17         position: relative;
     17        position: absolute;
    1818        float: left;
    1919        width: 1px; /* required to have a size to be focusable in Safari */
    2020        height: 1px;
     
    2828        z-index: 5;
    2929}
    3030
    31 .customize-partial-edit-shortcut:active {
     31.widget .customize-partial-edit-shortcut button:active,
     32.customize-partial-edit-shortcut button:active {
    3233        padding: 0;
    3334        border: 0;
    3435}
    3536
    3637/* Styles for the actual shortcut */
    37 .customize-partial-edit-shortcut:before {
     38.widget .customize-partial-edit-shortcut button,
     39.customize-partial-edit-shortcut button {
    3840        position: absolute;
    3941        left: -36px;
    4042        color: #fff;
    4143        width: 30px;
    4244        height: 30px;
     45        min-width: 30px;
     46        min-height: 30px;
    4347        font-size: 18px;
    44         font-family: dashicons;
    45         content: '\f464';
    4648        z-index: 5;
    4749        background-color: #0085ba;
     50        background: #0085ba;
    4851        border-radius: 50%;
    4952        border: 2px solid #fff;
    5053        box-shadow: 0 2px 1px rgba(46,68,83,0.15);
     
    6568                     -1px 0 1px #006799;
    6669}
    6770
    68 .customize-partial-edit-shortcut:hover:before,
    69 .customize-partial-edit-shortcut:focus:before {
     71.customize-partial-edit-shortcut button svg {
     72        fill: #fff;
     73        min-width: 20px;
     74        min-height: 20px;
     75}
     76
     77.customize-partial-edit-shortcut button:hover,
     78.customize-partial-edit-shortcut button:focus {
    7079    background: #008ec2; /* matches primary buttons */
    7180        border-color: #191e23; /* provides visual focus style with 4.5 contrast against background color */
    7281}
    7382
    74 body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before {
     83body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button {
    7584        animation-name: customize-partial-edit-shortcut-bounce-appear;
    7685        pointer-events: auto;
    7786}
    78 body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before {
     87body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button {
    7988        animation-name: customize-partial-edit-shortcut-bounce-disappear;
    8089        pointer-events: none;
    8190}
    8291
    83 .page-sidebar-collapsed .customize-partial-edit-shortcut:before,
    84 .customize-partial-edit-shortcut-hidden:before {
     92.page-sidebar-collapsed .customize-partial-edit-shortcut button,
     93.customize-partial-edit-shortcut-hidden .customize-partial-edit-shortcut button {
    8594        visibility: hidden;
    8695}
    8796
    88 .customize-partial-edit-shortcut-left-margin:before {
     97.customize-partial-edit-shortcut-left-margin .customize-partial-edit-shortcut button {
    8998        left: 0;
    9099}
    91100
    body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:be 
    144153}
    145154
    146155@media screen and (max-width:800px) {
    147         .customize-partial-edit-shortcut:before {
     156        .customize-partial-edit-shortcut button {
    148157                left: -18px; /* Assume there will be less of a margin available on smaller screens */
    149158        }
    150159}
  • 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 bfbb2ef..5c6f120 100644
    wp.customize.selectiveRefresh = ( function( $, api ) { 
    214214                 * @return {jQuery} The edit shortcut button element.
    215215                 */
    216216                createEditShortcut: function() {
    217                         var partial = this, shortcutTitle;
     217                        var partial = this, shortcutTitle, $buttonContainer, $button, $image;
    218218                        shortcutTitle = partial.getEditShortcutTitle();
    219                         return $( '<button>', {
     219                        $buttonContainer = $( '<span>', {
     220                                'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName()
     221                        } );
     222                        $button = $( '<button>', {
    220223                                'aria-label': shortcutTitle,
    221224                                'title': shortcutTitle,
    222                                 'type': 'button',
    223                                 'class': 'customize-partial-edit-shortcut ' + partial.getEditShortcutClassName()
     225                                'class': 'customize-partial-edit-shortcut-button'
    224226                        } );
     227                        $image = $( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"/></svg>' );
     228                        $button.append( $image );
     229                        $buttonContainer.append( $button );
     230                        return $buttonContainer;
    225231                },
    226232
    227233                /**