|
@@ -9,9 +9,11 @@ add_color_rule( 'bg', '#ffffff', array(
|
|
|
.screen-reader-text:focus,
|
|
|
body,
|
|
|
body .widget_eu_cookie_law_widget #eu-cookie-law,
|
|
|
- body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept', 'background-color' ),
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
|
|
|
+ .main-navigation > div > ul > li > .sub-menu', 'background-color' ),
|
|
|
|
|
|
// Text-color
|
|
|
+ // Needs contrast against `link` (primary background color)
|
|
|
array( '.a8c-posts-list-item__featured span,
|
|
|
.a8c-posts-list__view-all,
|
|
|
.a8c-posts-list__view-all:focus,
|
|
@@ -63,7 +65,7 @@ add_color_rule( 'bg', '#ffffff', array(
|
|
|
input.has-focus[type="submit"],
|
|
|
input:focus[type="submit"],
|
|
|
input:hover[type="submit"],
|
|
|
- input[type="submit"]', 'color' ),
|
|
|
+ input[type="submit"]', 'color', 'link' ),
|
|
|
|
|
|
), __( 'Background Color' ) );
|
|
|
|
|
@@ -86,6 +88,7 @@ add_color_rule( 'link', '#0000ff', array(
|
|
|
input[type="submit"]', 'background-color' ),
|
|
|
|
|
|
// Text-color
|
|
|
+ // Needs contrast against `bg` (white content background color)
|
|
|
array( '.has-primary-color[class],
|
|
|
.main-navigation a,
|
|
|
.main-navigation a:link,
|
|
@@ -97,13 +100,188 @@ add_color_rule( 'link', '#0000ff', array(
|
|
|
.wp-block-button.is-style-outline.wp-block-button__link,
|
|
|
.wp-block-button.is-style-outline.wp-block-button__link:active,
|
|
|
.wp-block-newspack-blocks-homepage-articles article .entry-title a,
|
|
|
- a', 'color' ),
|
|
|
+ a', 'color', 'bg' ),
|
|
|
|
|
|
// Border color left
|
|
|
- array( '.wp-block-quote', 'border-left-color', 'blue' ),
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.wp-block-quote', 'border-left-color', 'bg' ),
|
|
|
|
|
|
// Border color right
|
|
|
+ // Needs contrast against `bg`
|
|
|
array( '.wp-block-quote[style*="text-align: right"],
|
|
|
- .wp-block-quote[style*="text-align:right"]', 'border-right-color', 'blue' ),
|
|
|
+ .wp-block-quote[style*="text-align:right"]', 'border-right-color', 'bg' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ // Needs contrast against `bg` with less contrast
|
|
|
+ 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', 'bg', 3 ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` with less contrast
|
|
|
+ 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,
|
|
|
+ .site-title a:hover,
|
|
|
+ .social-navigation 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', 'bg', 3 ),
|
|
|
+
|
|
|
+ // Border-color
|
|
|
+ // Needs contrast against `bg` with less contrast
|
|
|
+ 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', 'bg', 3 ),
|
|
|
|
|
|
), __( 'Link Color' ) );
|
|
|
+
|
|
|
+// Text Color: Gray
|
|
|
+add_color_rule( 'txt', '#444444', array(
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '.has-foreground-background-color[class],
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` (white content background color)
|
|
|
+ array( '.comment-meta .comment-metadata,
|
|
|
+ .has-background-background-color[class],
|
|
|
+ .has-background-dark-background-color[class],
|
|
|
+ .has-background-light-background-color[class],
|
|
|
+ .has-foreground-color[class],
|
|
|
+ .main-navigation,
|
|
|
+ .screen-reader-text:focus,
|
|
|
+ .site-branding,
|
|
|
+ .wp-block-code,
|
|
|
+ .wp-block-code pre,
|
|
|
+ .wp-block-pullquote,
|
|
|
+ body,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
|
|
|
+ input[type="color"],
|
|
|
+ input[type="color"]:focus,
|
|
|
+ input[type="date"],
|
|
|
+ input[type="date"]:focus,
|
|
|
+ input[type="datetime"],
|
|
|
+ input[type="datetime"]:focus,
|
|
|
+ input[type="datetime-local"],
|
|
|
+ input[type="datetime-local"]:focus,
|
|
|
+ input[type="email"],
|
|
|
+ input[type="email"]:focus,
|
|
|
+ input[type="month"],
|
|
|
+ input[type="month"]:focus,
|
|
|
+ input[type="number"],
|
|
|
+ input[type="number"]:focus,
|
|
|
+ input[type="password"],
|
|
|
+ input[type="password"]:focus,
|
|
|
+ input[type="range"],
|
|
|
+ input[type="range"]:focus,
|
|
|
+ input[type="search"],
|
|
|
+ input[type="search"]:focus,
|
|
|
+ input[type="tel"],
|
|
|
+ input[type="tel"]:focus,
|
|
|
+ input[type="text"],
|
|
|
+ input[type="text"]:focus,
|
|
|
+ input[type="time"],
|
|
|
+ input[type="time"]:focus,
|
|
|
+ input[type="url"],
|
|
|
+ input[type="url"]:focus,
|
|
|
+ input[type="week"],
|
|
|
+ input[type="week"]:focus,
|
|
|
+ textarea,
|
|
|
+ textarea:focus', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` with less contrast
|
|
|
+ array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
|
|
|
+ .entry-footer,
|
|
|
+ .entry-meta,
|
|
|
+ .footer-navigation .footer-menu,
|
|
|
+ .has-foreground-light-color[class],
|
|
|
+ .site-info,
|
|
|
+ .wp-block-image figcaption,
|
|
|
+ .wp-block-latest-comments .wp-block-latest-comments__comment-date,
|
|
|
+ .wp-block-latest-posts .wp-block-latest-posts__post-date,
|
|
|
+ .wp-block-newspack-blocks-homepage-articles article .cat-links,
|
|
|
+ .wp-block-newspack-blocks-homepage-articles article .entry-meta,
|
|
|
+ .wp-block-pullquote .wp-block-pullquote__citation,
|
|
|
+ .wp-block-pullquote cite,
|
|
|
+ .wp-block-pullquote footer,
|
|
|
+ .wp-block-quote .wp-block-quote__citation,
|
|
|
+ .wp-block-quote cite,
|
|
|
+ .wp-block-quote footer,
|
|
|
+ .wp-block-quote.is-large .wp-block-quote__citation,
|
|
|
+ .wp-block-quote.is-large cite,
|
|
|
+ .wp-block-quote.is-large footer,
|
|
|
+ .wp-block-quote.is-style-large .wp-block-quote__citation,
|
|
|
+ .wp-block-quote.is-style-large cite,
|
|
|
+ .wp-block-quote.is-style-large footer,
|
|
|
+ .wp-block-video figcaption,
|
|
|
+ figcaption', 'color', 'bg', 3 ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` with transparency
|
|
|
+ array( '.has-foreground-light-background-color[class]', 'background-color', 'bg', 0.5 ),
|
|
|
+
|
|
|
+), __( 'Text Color' ) );
|
|
|
+
|
|
|
+// Accent Color: Red
|
|
|
+add_color_rule( 'fg1', '#ff0000', array(
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ array( '.has-secondary-color[class]', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '.has-secondary-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
+), __( 'Accent Color' ) );
|