Skip to content

Commit

Permalink
Twenty Nineteen: Update selectors used to change the primary color in…
Browse files Browse the repository at this point in the history
… the Customizer.

The `.editor-block-list__block` class was removed in WordPress 5.4. It is now replaced with a selector that works in the current versions and is backward compatible.

Follow-up to [43842].

Props poena, faisal03, ashikur698.
Fixes #59922.

git-svn-id: https://develop.svn.wordpress.org/trunk@57637 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Feb 15, 2024
1 parent 5072772 commit 789e4ab
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/wp-content/themes/twentynineteen/inc/color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,42 +214,42 @@ function twentynineteen_custom_colors_css() {
* - pullquote (solid color)
* - buttons
*/
.editor-block-list__layout .editor-block-list__block a,
.editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
.editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color),
.editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
.editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color),
.editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink {
.editor-styles-wrapper .wp-block a,
.editor-styles-wrapper .wp-block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block .wp-block-file .wp-block-file__textlink {
color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
.editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
.editor-styles-wrapper .editor-block-list__layout .wp-block-freeform blockquote {
.editor-styles-wrapper .wp-block.wp-block-quote:not(.is-large):not(.is-style-large),
.editor-styles-wrapper .wp-block .wp-block-freeform blockquote {
border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
.editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color:not(.has-background-color) {
.editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color:not(.has-background-color) {
background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
.editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__button,
.editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:active,
.editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
.editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
.editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__button,
.editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:active,
.editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
.editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
/* Hover colors */
.editor-block-list__layout .editor-block-list__block a:hover,
.editor-block-list__layout .editor-block-list__block a:active,
.editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink:hover {
.editor-styles-wrapper .wp-block a:hover,
.editor-styles-wrapper .wp-block a:active,
.editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__textlink:hover {
color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
}
/* Do not overwrite solid color pullquote or cover links */
.editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color a,
.editor-block-list__layout .editor-block-list__block .wp-block-cover a {
.editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color a,
.editor-styles-wrapper .wp-block.wp-block-cover a {
color: inherit;
}
';
Expand Down

0 comments on commit 789e4ab

Please sign in to comment.