WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/02/2018 11:52:16 PM (14 months ago)
Author:
allancole
Message:

Importing Twenty Nineteen, our new default theme for 2019, set for 5.0.

Let Gutenberg shine with this simple, fast, and powerful theme. Initial development occurred on GitHub. See: https://github.com/WordPress/twentynineteen

Props allancole, karmatosed, kjellr, yingling017, mrasharirfan, milana_cap, fabiankaegy, westonruter, aaronjorbin, netweb, b-07, khleomix, blowery, dereksmart, jasmussen, audrasjb, nielslange, mmaumio, dimadin, joyously, anevins12, peterwilsoncc, dannycooper, icaleb, siriokun, technosiren, travel_girl, azchughtai, ianbelanger, nadim1992, ismailelkorchi, nativeinside, chetan200891, icaleb, grapplerulrich, ocean90, joshfeck, frankew, abdulwahab610, mendezcode, eliorivero, melchoyce, joen, laurelfulford, mdawaffe, kraftbj, dsmart, mukeshpanchal27, burhandodhy, crunnells, Ismail-elkorchi, aryaprakasa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-content/themes/twentynineteen/inc/color-patterns.php

    r43842 r43860  
    1313function twentynineteen_custom_colors_css() {
    1414
    15     $default_primary_color       = 199;
    16     $primary_color               = absint( get_theme_mod( 'colorscheme_hue', $default_primary_color ) );
     15    if ( 'default' === get_theme_mod( 'colorscheme', 'default' ) ) {
     16        $primary_color = 199;
     17    } else {
     18        $primary_color = absint( get_theme_mod( 'colorscheme_primary_hue', 199 ) );
     19    }
    1720
    1821    /**
     
    2427     */
    2528
    26     $saturation = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) );
    27     $reduced_saturation = ( .8 * $saturation ) . '%';
    28     $saturation = $saturation . '%';
     29    $saturation      = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) );
     30    $saturation      = $saturation . '%';
     31
     32    $lightness       = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) );
     33    $lightness       = $lightness . '%';
     34
     35    $lightness_hover = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) );
     36    $lightness_hover = $lightness_hover . '%';
    2937
    3038    $theme_css = '
     
    5563        .entry-content > *[class^="wp-block-"].is-style-solid-color .has-primary-background-color,
    5664        .entry-content .wp-block-file .wp-block-file__button {
    57             background-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     65            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    5866        }
    5967
     
    9098        .entry-content > *[class^="wp-block-"] .has-primary-color,
    9199        .entry-content > *[class^="wp-block-"].is-style-solid-color .has-primary-color {
    92             color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     100            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    93101        }
    94102
     
    100108        .entry-content .wp-block-quote:not(.is-large),
    101109        .entry-content .wp-block-quote:not(.is-style-large) {
    102             border-left-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     110            border-left-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    103111        }
    104112
     
    123131        input[type="color"]:focus,
    124132        textarea:focus {
    125             border-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     133            border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    126134        }
    127135
    128136        .gallery-item > div > a:focus {
    129             box-shadow: 0 0 0 2px hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     137            box-shadow: 0 0 0 2px hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    130138        }
    131139
     
    140148        #cancel-comment-reply-link:hover,
    141149        .widget a:hover {
    142             color: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     150            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    143151        }
    144152
     
    149157        .main-navigation .sub-menu > li > a:not(.mobile-submenu-expand):hover,
    150158        .main-navigation .sub-menu > li > a:not(.mobile-submenu-expand):focus {
    151             background: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     159            background: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    152160        }';
    153161
     
    165173        .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
    166174        .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color) {
    167             color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     175            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    168176        }
    169177
    170178        .editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
    171179        .editor-styles-wrapper .editor-block-list__layout .wp-block-freeform blockquote {
    172             border-left: 2px solid hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     180            border-left: 2px solid hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    173181        }
    174182
    175183        .editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color:not(.has-background-color) {
    176             background-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     184            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    177185        }
    178186
     
    182190        .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
    183191        .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    184             background-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     192            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    185193        }
    186194
     
    188196        .editor-block-list__layout .editor-block-list__block a:hover,
    189197        .editor-block-list__layout .editor-block-list__block a:active {
    190             color: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     198            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    191199        }
    192200
Note: See TracChangeset for help on using the changeset viewer.