WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2018 02:32:33 AM (16 months ago)
Author:
pento
Message:

Default Themes: Import Twenty Nineteen from the 5.0 branch.

Merges [43808,43821,43842,43860,43892,43904,43909,43926-43929,43956,43961-43963] from the 5.0 branch to trunk.

Props allancole, karmatosed, kjellr, yingling017, mrasharirfan, milana_cap, fabiankaegy, westonruter, jorbin, netweb, b-07, khleomix, audrasjb, nielslange, mmaumio, richsalvucci, littlebigthing, dimadin, joyously, anevins, peterwilsoncc, dannycooper, iCaleb, siriokun, technosiren, travel_girl, azchughtai, ianbelanger, nadim1992, ismailelkorchi, nativeinside, chetan200891, grapplerulrich, ocean90, joshfeck, frankew, AbdulWahab610, mendezcode, eliorivero, melchoyce, joen, laurelfulford, mdawaffe, kraftbj, dsmart, nao, mayukojpn, enodekciw, ketuchetan, atanasangelovdev, poena, sharaz, artisticasad, mukesh27, burhandodhy, crunnells, aprakasa, themeroots, imonly_ik, tlxo, youthkee, brentswisher, smyoon315, mrahmadawais, desideveloper, Kau-Boy, mor10, mikeyarce, dingo_bastard, xkon, twoabove.

Fixes #45424.

Location:
trunk
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-content/themes/twentynineteen/inc/color-patterns.php

    r43842 r44149  
    99
    1010/**
    11  * Generate the CSS for the current custom color scheme.
     11 * Generate the CSS for the current primary color.
    1212 */
    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( 'primary_color', 'default' ) ) {
     16        $primary_color = 199;
     17    } else {
     18        $primary_color = absint( get_theme_mod( 'primary_color_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    $saturation_selection = absint( apply_filters( 'twentynineteen_custom_colors_saturation_selection', 50 ) );
     33    $saturation_selection = $saturation_selection . '%';
     34
     35    $lightness            = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) );
     36    $lightness            = $lightness . '%';
     37
     38    $lightness_hover      = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) );
     39    $lightness_hover      = $lightness_hover . '%';
     40
     41    $lightness_selection  = absint( apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ) );
     42    $lightness_selection  = $lightness_selection . '%';
    2943
    3044    $theme_css = '
     
    4761        .main-navigation .sub-menu,
    4862        .sticky-post,
    49         .entry-content .wp-block-button .wp-block-button__link,
    50         .button, button, input[type="button"], input[type="reset"], input[type="submit"],
    51         .entry-content > .has-primary-background-color,
    52         .entry-content > *[class^="wp-block-"].has-primary-background-color,
    53         .entry-content > *[class^="wp-block-"] .has-primary-background-color,
    54         .entry-content > *[class^="wp-block-"].is-style-solid-color,
    55         .entry-content > *[class^="wp-block-"].is-style-solid-color .has-primary-background-color,
    56         .entry-content .wp-block-file .wp-block-file__button {
    57             background-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     63        .entry .entry-content .wp-block-button .wp-block-button__link:not(.has-background),
     64        .entry .button, button, input[type="button"], input[type="reset"], input[type="submit"],
     65        .entry .entry-content > .has-primary-background-color,
     66        .entry .entry-content > *[class^="wp-block-"].has-primary-background-color,
     67        .entry .entry-content > *[class^="wp-block-"] .has-primary-background-color,
     68        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color,
     69        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-primary-background-color,
     70        .entry .entry-content .wp-block-file .wp-block-file__button {
     71            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    5872        }
    5973
     
    8094        .entry .entry-content .more-link:hover,
    8195        .main-navigation .main-menu > li > a + svg,
    82         .comment-navigation .nav-previous a:hover,
    83         .comment-navigation .nav-next a:hover,
     96        .comment .comment-metadata > a:hover,
    8497        .comment .comment-metadata .comment-edit-link:hover,
    8598        #colophon .site-info a:hover,
    8699        .widget a,
    87         .entry-content .wp-block-button.is-style-outline .wp-block-button__link,
    88         .entry-content .wp-block-button.is-style-outline .wp-block-button__link,
    89         .entry-content .wp-block-button.is-style-outline .wp-block-button__link,
    90         .entry-content > *[class^="wp-block-"] .has-primary-color,
    91         .entry-content > *[class^="wp-block-"].is-style-solid-color .has-primary-color {
    92             color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     100        .entry .entry-content .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
     101        .entry .entry-content > .has-primary-color,
     102        .entry .entry-content > *[class^="wp-block-"] .has-primary-color,
     103        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color,
     104        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color p {
     105            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    93106        }
    94107
     
    97110         * wp block quote
    98111         */
    99         .entry-content blockquote,
    100         .entry-content .wp-block-quote:not(.is-large),
    101         .entry-content .wp-block-quote:not(.is-style-large) {
    102             border-left-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     112        blockquote,
     113        .entry .entry-content blockquote,
     114        .entry .entry-content .wp-block-quote:not(.is-large),
     115        .entry .entry-content .wp-block-quote:not(.is-style-large) {
     116            border-left-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    103117        }
    104118
     
    123137        input[type="color"]:focus,
    124138        textarea:focus {
    125             border-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     139            border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    126140        }
    127141
    128142        .gallery-item > div > a:focus {
    129             box-shadow: 0 0 0 2px hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     143            box-shadow: 0 0 0 2px hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    130144        }
    131145
     
    134148        .main-navigation .main-menu > li > a:hover,
    135149        .main-navigation .main-menu > li > a:hover + svg,
     150        .post-navigation .nav-links a:hover,
    136151        .post-navigation .nav-links a:hover .post-title,
    137152        .author-bio .author-description .author-link:hover,
     153        .entry .entry-content > .has-secondary-color,
     154        .entry .entry-content > *[class^="wp-block-"] .has-secondary-color,
     155        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color,
     156        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color p,
    138157        .comment .comment-author .fn a:hover,
    139158        .comment-reply-link:hover,
     159        .comment-navigation .nav-previous a:hover,
     160        .comment-navigation .nav-next a:hover,
    140161        #cancel-comment-reply-link:hover,
    141162        .widget a:hover {
    142             color: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     163            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    143164        }
    144165
     
    147168        .main-navigation .sub-menu > li > a:hover:after,
    148169        .main-navigation .sub-menu > li > a:focus:after,
    149         .main-navigation .sub-menu > li > a:not(.mobile-submenu-expand):hover,
    150         .main-navigation .sub-menu > li > a:not(.mobile-submenu-expand):focus {
    151             background: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     170        .main-navigation .sub-menu > li > .menu-item-link-return:hover,
     171        .main-navigation .sub-menu > li > .menu-item-link-return:focus,
     172        .main-navigation .sub-menu > li > a:not(.submenu-expand):hover,
     173        .main-navigation .sub-menu > li > a:not(.submenu-expand):focus,
     174        .entry .entry-content > .has-secondary-background-color,
     175        .entry .entry-content > *[class^="wp-block-"].has-secondary-background-color,
     176        .entry .entry-content > *[class^="wp-block-"] .has-secondary-background-color,
     177        .entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-secondary-background-color {
     178            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
     179        }
     180
     181        /* Text selection colors */
     182        ::selection {
     183            background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */
     184        }
     185        ::-moz-selection {
     186            background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */
    152187        }';
    153188
     
    164199        .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color),
    165200        .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
    166         .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; */
     201        .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color),
     202        .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink {
     203            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    168204        }
    169205
    170206        .editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
    171207        .editor-styles-wrapper .editor-block-list__layout .wp-block-freeform blockquote {
    172             border-left: 2px solid hsl( ' . $primary_color . ', ' . $saturation . ', 33% ); /* base: #0073a8; */
     208            border-left: 2px solid hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    173209        }
    174210
    175211        .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; */
     212            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    177213        }
    178214
     
    182218        .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
    183219        .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; */
     220            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    185221        }
    186222
    187223        /* Hover colors */
    188224        .editor-block-list__layout .editor-block-list__block a:hover,
    189         .editor-block-list__layout .editor-block-list__block a:active {
    190             color: hsl( ' . $primary_color . ', ' . $saturation . ', 23% ); /* base: #005177; */
     225        .editor-block-list__layout .editor-block-list__block a:active,
     226        .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink:hover {
     227            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    191228        }
    192229
Note: See TracChangeset for help on using the changeset viewer.