|
@@ -0,0 +1,214 @@
|
|
|
+<?php
|
|
|
+/* Custom Colors: Exford */
|
|
|
+
|
|
|
+// Background Color
|
|
|
+// $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,
|
|
|
+ .sticky-post,
|
|
|
+ .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
+ .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
+ .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
+ .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
+ .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
+ .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
+ .wp-block-pullquote.is-style-solid-color,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'color', 'link' ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 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],
|
|
|
+ .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 ),
|
|
|
+ // Background-color
|
|
|
+ array( '.has-background-background-color[class]', 'background-color' ),
|
|
|
+ // Background-color darkened
|
|
|
+ array( '.has-background-dark-background-color[class]', 'background-color', '-1' ),
|
|
|
+ // Background-color lightened
|
|
|
+ array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
|
|
|
+
|
|
|
+), __( 'Background Color' ) );
|
|
|
+
|
|
|
+// Link Color
|
|
|
+// $config-global--color-primary-default
|
|
|
+add_color_rule( 'link', '#23883D', 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( '.a8c-posts-list .a8c-posts-list-item__title a:active,
|
|
|
+ .a8c-posts-list .a8c-posts-list-item__title a:focus,
|
|
|
+ .a8c-posts-list .a8c-posts-list-item__title a:hover,
|
|
|
+ .entry-title a:active,
|
|
|
+ .entry-title a:focus,
|
|
|
+ .entry-title a:hover,
|
|
|
+ .main-navigation a,
|
|
|
+ .main-navigation a:link,
|
|
|
+ .main-navigation a:visited,
|
|
|
+ .page-title a:active,
|
|
|
+ .page-title a:focus,
|
|
|
+ .page-title a:hover,
|
|
|
+ .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,
|
|
|
+ .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', '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' ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // 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' ) );
|
|
|
+
|
|
|
+// Text Color
|
|
|
+// $config-global--color-foreground-default
|
|
|
+add_color_rule( 'txt', '#111111', array(
|
|
|
+
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg` with more contrast
|
|
|
+ array( '.comment-meta .comment-metadata,
|
|
|
+ .main-navigation,
|
|
|
+ .screen-reader-text:focus,
|
|
|
+ .site-title,
|
|
|
+ .social-navigation a,
|
|
|
+ .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', 7 ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ // Needs contrast against `bg` with more contrast
|
|
|
+ array( '.wp-block-cover,
|
|
|
+ .wp-block-cover-image,
|
|
|
+ body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color', 'bg', 7 ),
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Foreground
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.has-foreground-color[class]', 'color', 'bg' ),
|
|
|
+ array( '.has-foreground-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
+ // Text-color darkened
|
|
|
+ array( '.has-foreground-dark-color[class]', 'color', '-1' ),
|
|
|
+ // Background-color darkened
|
|
|
+ array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
|
|
|
+
|
|
|
+ // Text-color brightened
|
|
|
+ array( '.has-foreground-light-color[class]', 'color', '+2' ),
|
|
|
+ // Background-color brightened
|
|
|
+ array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
|
|
|
+
|
|
|
+), __( 'Text Color' ) );
|
|
|
+
|
|
|
+// Accent Color
|
|
|
+// $config-global--color-secondary-default
|
|
|
+add_color_rule( 'fg1', '#0963C4', array(
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Utility Classes
|
|
|
+ */
|
|
|
+ // Text-color
|
|
|
+ // Needs contrast against `bg`
|
|
|
+ array( '.has-secondary-color[class]', 'color', 'bg' ),
|
|
|
+
|
|
|
+ // Background-color
|
|
|
+ array( '.has-secondary-background-color[class]', 'background-color' ),
|
|
|
+
|
|
|
+), __( 'Secondary Color' ) );
|