- Timestamp:
- 12/14/2018 02:32:33 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43808,43821,43842,43860,43892,43904,43909,43926-43929,43956,43961-43963
- Property svn:mergeinfo changed
-
trunk/src/wp-content/themes/twentynineteen/inc/color-patterns.php
r43842 r44149 9 9 10 10 /** 11 * Generate the CSS for the current custom color scheme.11 * Generate the CSS for the current primary color. 12 12 */ 13 13 function twentynineteen_custom_colors_css() { 14 14 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 } 17 20 18 21 /** … … 24 27 */ 25 28 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 . '%'; 29 43 30 44 $theme_css = ' … … 47 61 .main-navigation .sub-menu, 48 62 .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; */ 58 72 } 59 73 … … 80 94 .entry .entry-content .more-link:hover, 81 95 .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, 84 97 .comment .comment-metadata .comment-edit-link:hover, 85 98 #colophon .site-info a:hover, 86 99 .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; */ 93 106 } 94 107 … … 97 110 * wp block quote 98 111 */ 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; */ 103 117 } 104 118 … … 123 137 input[type="color"]:focus, 124 138 textarea:focus { 125 border-color: hsl( ' . $primary_color . ', ' . $saturation . ', 33%); /* base: #0073a8; */139 border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ 126 140 } 127 141 128 142 .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; */ 130 144 } 131 145 … … 134 148 .main-navigation .main-menu > li > a:hover, 135 149 .main-navigation .main-menu > li > a:hover + svg, 150 .post-navigation .nav-links a:hover, 136 151 .post-navigation .nav-links a:hover .post-title, 137 152 .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, 138 157 .comment .comment-author .fn a:hover, 139 158 .comment-reply-link:hover, 159 .comment-navigation .nav-previous a:hover, 160 .comment-navigation .nav-next a:hover, 140 161 #cancel-comment-reply-link:hover, 141 162 .widget a:hover { 142 color: hsl( ' . $primary_color . ', ' . $saturation . ', 23%); /* base: #005177; */163 color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */ 143 164 } 144 165 … … 147 168 .main-navigation .sub-menu > li > a:hover:after, 148 169 .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; */ 152 187 }'; 153 188 … … 164 199 .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color), 165 200 .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; */ 168 204 } 169 205 170 206 .editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large), 171 207 .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; */ 173 209 } 174 210 175 211 .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; */ 177 213 } 178 214 … … 182 218 .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus, 183 219 .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; */ 185 221 } 186 222 187 223 /* Hover colors */ 188 224 .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; */ 191 228 } 192 229
Note: See TracChangeset
for help on using the changeset viewer.