Dalston: Fixing color-annotations against latest changes in varia.

This commit is contained in:
Allan Cole 2020-07-28 17:00:39 -04:00
parent e6a3d8ccad
commit 6c96749023
4 changed files with 122 additions and 30 deletions

View file

@ -87,10 +87,7 @@ add_color_rule( 'bg', '#FFFFFF', array(
input[type="url"],
input[type="week"],
select,
textarea,
.main-navigation > div > ul > li > .sub-menu > li > a,
.main-navigation > div > ul > li > .sub-menu > li:first-child > a,
.main-navigation > div > ul > li > .sub-menu > li:last-child > a', 'border-color', '-1' ),
textarea', 'border-color', '-1' ),
// Border-top-color
array( '.comment-list .children > li,
.comment-list > li', 'border-top-color', '-1' ),
@ -115,8 +112,14 @@ add_color_rule( 'bg', '#FFFFFF', array(
.has-background-light-color[class]', 'color' ),
// Background-color
array( '.has-background-background-color[class]', 'background-color' ),
// Text-color darkened
array( '.has-background-dark-color[class]', 'color', '-1' ),
// Background-color darkened
array( '.has-background-dark-background-color[class]', 'background-color', '-1' ),
// Text-color lightened
array( '.has-background-light-color[class]', 'color', '+1' ),
// Background-color lightened
array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
@ -130,7 +133,6 @@ add_color_rule( 'link', '#0073AA', array(
array( '.a8c-posts-list-item__featured span,
.a8c-posts-list__view-all,
.button,
.has-primary-background-color[class],
.sticky-post,
.wp-block-button__link,
.wp-block-file .wp-block-file__button,
@ -140,26 +142,81 @@ add_color_rule( 'link', '#0073AA', array(
button,
button[data-load-more-btn],
input[type="submit"]', 'background-color' ),
// Background-color darkened
array( '.a8c-posts-list__view-all:focus,
.a8c-posts-list__view-all:hover,
.button:focus,
.button:hover,
.has-focus.a8c-posts-list__view-all,
.has-focus.button,
.has-focus.wp-block-button__link,
.has-focus.wp-block-file__button,
.main-navigation #toggle:focus + #toggle-menu,
.wp-block-button__link:focus,
.wp-block-button__link:hover,
.wp-block-file__button:focus,
.wp-block-file__button:hover,
body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
button.has-focus,
button:focus,
button:hover,
input.has-focus[type="submit"],
input:focus[type="submit"],
input:hover[type="submit"]', 'background-color', '-1' ),
// Text-color
array( '.a8c-posts-list-item__featured span,
.has-primary-color[class],
.main-navigation a,
.main-navigation a:link,
.main-navigation a:visited,
.site-title a:hover,
.social-navigation a:hover,
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link:active,
.wp-block-button.is-style-outline.wp-block-button__link,
.wp-block-button.is-style-outline.wp-block-button__link:active,
.sticky-post,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active,
.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color):active,
.wp-block-newspack-blocks-homepage-articles article .entry-title a,
.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
.wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
a,
.site-header .main-navigation > div > ul > li.current-menu-item li > a,
.site-header .main-navigation > div > ul > li.focus li > a,
.site-header .main-navigation > div > ul > li:hover li > a,
.main-navigation > div > ul > li > .sub-menu', 'color' ),
// Text-color darkened
array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
.comment-meta .comment-metadata a:active,
.comment-meta .comment-metadata a:hover,
.entry-footer a:active,
.entry-footer a:hover,
.entry-meta a:active,
.entry-meta a:hover,
.footer-navigation .footer-menu a:hover,
.main-navigation a:hover,
.site-info a:hover,
.wp-block-button.is-style-outline .wp-block-button__link.has-focus,
.wp-block-button.is-style-outline .wp-block-button__link:focus,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline.wp-block-button__link.has-focus,
.wp-block-button.is-style-outline.wp-block-button__link:focus,
.wp-block-button.is-style-outline.wp-block-button__link:hover,
.wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
.wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
a:hover', 'color', '-1' ),
// Border color
array( '.main-navigation > div > ul > li > .sub-menu', 'border-color' ),
// Border color left
array( '.wp-block-quote', 'border-left-color' ),
@ -172,11 +229,31 @@ add_color_rule( 'link', '#0073AA', array(
.site-header .main-navigation > div > ul > li.focus > ul:before,
.site-header .main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
// Border color darkened
array( 'input[type="color"]:focus,
input[type="date"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="email"]:focus,
input[type="month"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="range"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="week"]:focus,
textarea:focus', 'border-color', '-1' ),
/**
* Utility Classes
*/
// Background-color
array( '.has-primary-background-color[class]', 'background-color' ),
array( '.has-primary-background-color[class],
.has-primary-background-color[class].has-background-dim', 'background-color' ),
// Text-color
array( '.has-primary-color[class]', 'color' ),
@ -197,14 +274,28 @@ add_color_rule( 'txt', '#1e1e1e', array(
body .widget_eu_cookie_law_widget #eu-cookie-law,
body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
.site-header .main-navigation > div > ul > li > a:hover,
.site-header .main-navigation > div > ul > li:hover li:hover > a, .site-header .main-navigation > div > ul > li:hover li.focus > a, .site-header .main-navigation > div > ul > li:hover li.current-menu-item > a,
.site-header .main-navigation > div > ul > li.focus li:hover > a, .site-header .main-navigation > div > ul > li.focus li.focus > a,
.site-header .main-navigation > div > ul > li.focus li.current-menu-item > a, .site-header .main-navigation > div > ul > li.current-menu-item li:hover > a,
.site-header .main-navigation > div > ul > li:hover li:hover > a,
.site-header .main-navigation > div > ul > li:hover li.focus > a,
.site-header .main-navigation > div > ul > li:hover li.current-menu-item > a,
.site-header .main-navigation > div > ul > li.focus li:hover > a,
.site-header .main-navigation > div > ul > li.focus li.focus > a,
.site-header .main-navigation > div > ul > li.focus li.current-menu-item > a,
.site-header .main-navigation > div > ul > li.current-menu-item li:hover > a,
.site-header .main-navigation > div > ul > li.current-menu-item li.focus > a,
.site-header .main-navigation > div > ul > li.current-menu-item li.current-menu-item > a', 'color' ),
// Text-color darkened
array( '.has-foreground-dark-color,
.site-branding,
.site-description,
.site-title,
.social-navigation a', 'color', '-1' ),
// Background-color
array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
// Text-color darkened
array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color', '-1' ),
/**
* Utility Classes
@ -214,6 +305,8 @@ add_color_rule( 'txt', '#1e1e1e', array(
.has-background-background-color[class],
.has-background-dark-background-color[class],
.has-background-light-background-color[class]', 'color' ),
// Background
array( '.has-foreground-background-color[class]', 'background-color' ),
// Text-color darkened
@ -282,17 +375,16 @@ add_color_rule( 'fg1', '#0d1b24', array(
/**
* Custom CSS
*/
function mayland_custom_colors_extra_css() { ?>
function dalston_custom_colors_extra_css() { ?>
.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: currentColor;
}
@media screen and (min-width: 560px) {
.main-navigation > div > ul > li > .sub-menu > li:first-child > a {
border-top: 1px solid;
}
.main-navigation > div > ul > li > .sub-menu > li > a {
border-left: 1px solid;
border-right: 1px solid;
}
.main-navigation > div > ul > li > .sub-menu > li:last-child > a {
border-bottom: 1px solid;
.main-navigation > div > ul > li > .sub-menu {
border: 1px solid;
}
.site-header .main-navigation > div > ul > li.current-menu-item > ul::before,
.site-header .main-navigation > div > ul > li.focus > ul::before,
@ -301,7 +393,7 @@ function mayland_custom_colors_extra_css() { ?>
}
}
<?php }
add_theme_support( 'custom_colors_extra_css', 'mayland_custom_colors_extra_css' );
add_theme_support( 'custom_colors_extra_css', 'dalston_custom_colors_extra_css' );
/**
* Featured Varia Palettes

View file

@ -263,7 +263,7 @@ a {
}
}
.entry-content [class*="__inner-container"] a {
.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
text-decoration: underline;
&:hover {

View file

@ -4253,11 +4253,11 @@ a {
border-color: #FFFFFF;
}
.entry-content [class*="__inner-container"] a {
.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
text-decoration: underline;
}
.entry-content [class*="__inner-container"] a:hover {
.entry-content [class*="__inner-container"] a:not(.wp-block-button__link):hover {
text-decoration: none;
}

View file

@ -4282,11 +4282,11 @@ a {
border-color: #FFFFFF;
}
.entry-content [class*="__inner-container"] a {
.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
text-decoration: underline;
}
.entry-content [class*="__inner-container"] a:hover {
.entry-content [class*="__inner-container"] a:not(.wp-block-button__link):hover {
text-decoration: none;
}