Make WordPress Core

Ticket #29988: 29988.2.patch

File 29988.2.patch, 2.0 KB (added by boonebgorges, 10 years ago)
  • src/wp-content/themes/twentyfifteen/js/color-scheme-control.js

    diff --git src/wp-content/themes/twentyfifteen/js/color-scheme-control.js src/wp-content/themes/twentyfifteen/js/color-scheme-control.js
    index 1aff097..91ae498 100644
     
    1 /* global colorScheme */
     1/* global colorScheme, Color */
    22/**
    33 * Add a listener to the Color Scheme control to update other color controls to new values/defaults.
    44 * Also trigger an update of the Color Scheme CSS when a color is changed.
     
    5757                });
    5858
    5959                // Add additional colors.
    60                 colors['secondary_textcolor'] = Color( colors.textcolor ).toCSS( 'rgba', 0.7 );
    61                 colors['border_color'] = Color( colors.textcolor ).toCSS( 'rgba', 0.1 );
    62                 colors['border_focus_color'] = Color( colors.textcolor ).toCSS( 'rgba', 0.3 );
    63                 colors['secondary_sidebar_textcolor'] = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.7 );
    64                 colors['sidebar_border_color'] = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.1 );
    65                 colors['sidebar_border_focus_color'] = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.3 );
     60                colors.secondary_textcolor = Color( colors.textcolor ).toCSS( 'rgba', 0.7 );
     61                colors.border_color = Color( colors.textcolor ).toCSS( 'rgba', 0.1 );
     62                colors.border_focus_color = Color( colors.textcolor ).toCSS( 'rgba', 0.3 );
     63                colors.secondary_sidebar_textcolor = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.7 );
     64                colors.sidebar_border_color = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.1 );
     65                colors.sidebar_border_focus_color = Color( colors.sidebar_textcolor ).toCSS( 'rgba', 0.3 );
    6666
    6767                return cssTemplate( colors );
    6868        }
     
    7070        // Update the CSS whenever a color setting is changed.
    7171        _.each( colorSettings, function( setting ) {
    7272                api( setting, function( setting ) {
    73                         setting.bind( _.throttle( function( value ) {
     73                        setting.bind( _.throttle( function() {
    7474                                api( 'color_scheme_css' ).set( getCSS() );
    7575                        }, 250 ) );
    7676                } );