|
@@ -5,15 +5,7 @@
|
|
|
// $config-global--color-background-default
|
|
|
add_color_rule( 'bg', '#ffffff', array(
|
|
|
|
|
|
- // Background-color
|
|
|
- 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,
|
|
|
- .main-navigation > div > ul > li > .sub-menu', 'background-color' ),
|
|
|
-
|
|
|
// Text-color
|
|
|
- // Needs contrast against `link` (primary)
|
|
|
array( '.a8c-posts-list-item__featured span,
|
|
|
.a8c-posts-list__view-all,
|
|
|
.a8c-posts-list__view-all:focus,
|
|
@@ -59,36 +51,36 @@ add_color_rule( 'bg', '#ffffff', array(
|
|
|
input.has-focus[type="submit"],
|
|
|
input:focus[type="submit"],
|
|
|
input:hover[type="submit"],
|
|
|
- input[type="submit"]', 'color', 'link' ),
|
|
|
+ input[type="submit"]', 'color' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ 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,
|
|
|
+ .main-navigation > div > ul > li > .sub-menu', 'background-color' ),
|
|
|
|
|
|
/**
|
|
|
* Utility Classes
|
|
|
*/
|
|
|
- // Text-color
|
|
|
- // Needs contrast against `link` (primary)
|
|
|
- array( '.has-primary-background-color[class]', 'color', 'link' ),
|
|
|
- // Text-color
|
|
|
- // Needs contrast against `fg1` (secondary)
|
|
|
- array( '.has-secondary-background-color[class]', 'color', 'fg1' ),
|
|
|
|
|
|
// Text-color
|
|
|
- // Needs contrast against `txt` (foreground)
|
|
|
- array( '.has-foreground-background-color[class],
|
|
|
+ array( '.has-primary-background-color[class],
|
|
|
+ .has-secondary-background-color[class],
|
|
|
+ .has-foreground-background-color[class],
|
|
|
.has-foreground-dark-background-color[class],
|
|
|
- .has-foreground-light-background-color[class]', 'color', 'txt', 12 ),
|
|
|
- // Text-color
|
|
|
- // Needs contrast against `txt` (background)
|
|
|
- array( '.has-background-color[class],
|
|
|
- .has-background-dark-color[class],
|
|
|
- .has-background-light-color[class],
|
|
|
- .has-background-background-color[class],
|
|
|
- .has-background-dark-background-color[class],
|
|
|
- .has-background-light-background-color[class]', 'color', 'bg', 12 ),
|
|
|
+ .has-foreground-light-background-color[class],
|
|
|
+ .has-background-color[class]', 'color' ),
|
|
|
+
|
|
|
// Background-color
|
|
|
array( '.has-background-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
// Background-color darkened
|
|
|
+ array( '.has-background-dark-color[class]', 'color', '-1' ),
|
|
|
array( '.has-background-dark-background-color[class]', 'background-color', '-1' ),
|
|
|
+
|
|
|
// Background-color lightened
|
|
|
+ array( '.has-background-light-color[class]', 'color', '+1' ),
|
|
|
array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
|
|
|
|
|
|
), __( 'Background Color' ) );
|
|
@@ -97,22 +89,7 @@ add_color_rule( 'bg', '#ffffff', array(
|
|
|
// $config-global--color-primary-default
|
|
|
add_color_rule( 'link', '#0000ff', array(
|
|
|
|
|
|
- // Background-color
|
|
|
- array( '.a8c-posts-list-item__featured span,
|
|
|
- .a8c-posts-list__view-all,
|
|
|
- .button,
|
|
|
- .sticky-post,
|
|
|
- .wp-block-button__link,
|
|
|
- .wp-block-file .wp-block-file__button,
|
|
|
- .wp-block-file__button,
|
|
|
- .wp-block-pullquote.is-style-solid-color,
|
|
|
- body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
|
|
|
- button,
|
|
|
- button[data-load-more-btn],
|
|
|
- input[type="submit"]', 'background-color' ),
|
|
|
-
|
|
|
// Text-color
|
|
|
- // Needs contrast against `bg`
|
|
|
array( '.main-navigation a,
|
|
|
.main-navigation a:link,
|
|
|
.main-navigation a:visited,
|
|
@@ -123,45 +100,8 @@ 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', 'bg' ),
|
|
|
-
|
|
|
- // Border color left
|
|
|
- // 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', '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,
|
|
|
+ a,
|
|
|
+ .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,
|
|
@@ -185,10 +125,52 @@ add_color_rule( 'link', '#0000ff', array(
|
|
|
.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 ),
|
|
|
+ a:hover', 'color' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '.a8c-posts-list-item__featured span,
|
|
|
+ .a8c-posts-list__view-all,
|
|
|
+ .button,
|
|
|
+ .sticky-post,
|
|
|
+ .wp-block-button__link,
|
|
|
+ .wp-block-file .wp-block-file__button,
|
|
|
+ .wp-block-file__button,
|
|
|
+ .wp-block-pullquote.is-style-solid-color,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
|
|
|
+ button,
|
|
|
+ button[data-load-more-btn],
|
|
|
+ input[type="submit"],
|
|
|
+ .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' ),
|
|
|
+
|
|
|
+ // Border color left
|
|
|
+ array( '.wp-block-quote', 'border-left-color' ),
|
|
|
+
|
|
|
+ // Border color right
|
|
|
+ array( '.wp-block-quote[style*="text-align: right"],
|
|
|
+ .wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
|
|
|
|
|
|
// Border-color (forms)
|
|
|
- // Needs contrast against `bg` with less contrast
|
|
|
array( 'input[type="color"]:focus,
|
|
|
input[type="date"]:focus,
|
|
|
input[type="datetime"]:focus,
|
|
@@ -204,16 +186,17 @@ add_color_rule( 'link', '#0000ff', array(
|
|
|
input[type="time"]:focus,
|
|
|
input[type="url"]:focus,
|
|
|
input[type="week"]:focus,
|
|
|
- textarea:focus', 'border-color', 'bg', 3 ),
|
|
|
+ textarea:focus', 'border-color' ),
|
|
|
|
|
|
/**
|
|
|
* Utility Classes
|
|
|
*/
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ array( '.has-primary-color[class]', 'color' ),
|
|
|
+
|
|
|
// Background-color
|
|
|
array( '.has-primary-background-color[class]', 'background-color' ),
|
|
|
- // Text-color
|
|
|
- // Needs contrast against `bg`
|
|
|
- array( '.has-primary-color[class]', 'color', 'bg' ),
|
|
|
|
|
|
), __( 'Link Color' ) );
|
|
|
|
|
@@ -221,11 +204,7 @@ add_color_rule( 'link', '#0000ff', array(
|
|
|
// $config-global--color-foreground-default
|
|
|
add_color_rule( 'txt', '#444444', array(
|
|
|
|
|
|
- // Background-color
|
|
|
- array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
|
|
|
-
|
|
|
// Text-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
array( '.comment-meta .comment-metadata,
|
|
|
.main-navigation,
|
|
|
.screen-reader-text:focus,
|
|
@@ -234,7 +213,8 @@ add_color_rule( 'txt', '#444444', array(
|
|
|
.wp-block-code pre,
|
|
|
.wp-block-pullquote,
|
|
|
body,
|
|
|
- body .widget_eu_cookie_law_widget #eu-cookie-law', 'color', 'bg', 7 ),
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law,
|
|
|
+ hr.wp-block-separator.is-style-dots:before', 'color' ),
|
|
|
|
|
|
// Text-color (forms)
|
|
|
// Needs contrast against form background-color (which is always white)
|
|
@@ -299,8 +279,13 @@ add_color_rule( 'txt', '#444444', array(
|
|
|
.wp-block-video figcaption,
|
|
|
figcaption', 'color', 'bg', 4 ),
|
|
|
|
|
|
+ // Background-color
|
|
|
+ array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
|
|
|
+
|
|
|
// Border-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
array( '.wp-block-code,
|
|
|
body .widget_eu_cookie_law_widget #eu-cookie-law,
|
|
|
input[type="color"],
|
|
@@ -319,37 +304,29 @@ add_color_rule( 'txt', '#444444', array(
|
|
|
input[type="url"],
|
|
|
input[type="week"],
|
|
|
select,
|
|
|
- textarea', 'border-color', 'bg', 7 ),
|
|
|
+ textarea', 'border-color' ),
|
|
|
|
|
|
// Border-top-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
array( '.comment-list .children > li,
|
|
|
.comment-list > li,
|
|
|
- .wp-block-pullquote', 'border-top-color', 'bg', 7 ),
|
|
|
+ .wp-block-pullquote', 'border-top-color' ),
|
|
|
|
|
|
// Border-bottom-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
array( '.comment-list,
|
|
|
.wp-block-pullquote,
|
|
|
hr,
|
|
|
- hr.wp-block-separator', 'border-bottom-color', 'bg', 7 ),
|
|
|
-
|
|
|
- // Text-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
- array( 'hr.wp-block-separator.is-style-dots:before', 'color', 'bg', 7 ),
|
|
|
-
|
|
|
- // Background-color
|
|
|
- // Needs contrast against `bg` with more contrast
|
|
|
- array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
|
|
|
- body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
|
|
|
- body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover', 'background-color', 'bg', 7 ),
|
|
|
+ hr.wp-block-separator', 'border-bottom-color' ),
|
|
|
|
|
|
/**
|
|
|
* Utility Classes
|
|
|
*/
|
|
|
- // Foreground
|
|
|
- // Needs contrast against `bg`
|
|
|
- array( '.has-foreground-color[class]', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ array( '.has-foreground-color[class],
|
|
|
+ .has-background-background-color[class],
|
|
|
+ .has-background-dark-background-color[class],
|
|
|
+ .has-background-light-background-color[class]', 'color' ),
|
|
|
+ // Background-color
|
|
|
array( '.has-foreground-background-color[class]', 'background-color' ),
|
|
|
|
|
|
// Text-color darkened
|
|
@@ -373,7 +350,7 @@ add_color_rule( 'fg1', '#ff0000', array(
|
|
|
*/
|
|
|
// Text-color
|
|
|
// Needs contrast against `bg`
|
|
|
- array( '.has-secondary-color[class]', 'color', 'bg' ),
|
|
|
+ array( '.has-secondary-color[class]', 'color' ),
|
|
|
|
|
|
// Background-color
|
|
|
array( '.has-secondary-background-color[class]', 'background-color' ),
|