Browse Source

Remove contrast rules

Kjell Reigstad 5 years ago
parent
commit
2a79103b66
1 changed files with 19 additions and 40 deletions
  1. 19 40
      barnsbury/inc/wpcom-colors.php

+ 19 - 40
barnsbury/inc/wpcom-colors.php

@@ -13,7 +13,6 @@ add_color_rule( 'bg', '#FFFDF6', array(
 			.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,
@@ -55,31 +54,23 @@ add_color_rule( 'bg', '#FFFDF6', array(
 			input[type="submit"],
 			.main-navigation > div > ul > li.current-menu-item li > a,
 			.main-navigation > div > ul > li.focus li > a,
-			.main-navigation > div > ul > li:hover li > a', 'color', 'link' ),
+			.main-navigation > div > ul > li:hover li > a', '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-foreground-light-background-color[class],
+			.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-background-light-background-color[class]', 'color' ),
 	// Background-color
 	array( '.has-background-background-color[class]', 'background-color' ),
 	// Background-color darkened
@@ -111,7 +102,6 @@ add_color_rule( 'link', '#20603C', array(
 			.main-navigation > div > ul > li:hover li > a', '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,
@@ -143,22 +133,19 @@ add_color_rule( 'link', '#20603C', array(
 			a,
 			.main-navigation > div > ul > li.current-menu-item > a,
 			.main-navigation > div > ul > li.focus > a,
-			.main-navigation > div > ul > li:hover > a', 'color', 'bg' ),
+			.main-navigation > div > ul > li:hover > a', 'color' ),
 
 	// Border color left
-	// Needs contrast against `bg`
-	array( '.wp-block-quote', 'border-left-color', 'bg' ),
+	array( '.wp-block-quote', 'border-left-color' ),
 
 	// 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' ),
+			.wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
 
 	// Border color bottom
-	// Needs contrast against `bg`
 	array( '.main-navigation > div > ul > li.current-menu-item > ul:before,
 			.main-navigation > div > ul > li.focus > ul:before,
-			.main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color', 'bg' ),
+			.main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
 
 	/**
 	 * Utility Classes
@@ -166,8 +153,7 @@ add_color_rule( 'link', '#20603C', array(
 	// Background-color
 	array( '.has-primary-background-color[class]', 'background-color' ),
 	// Text-color
-	// Needs contrast against `bg`
-	array( '.has-primary-color[class]', 'color', 'bg' ),
+	array( '.has-primary-color[class]', 'color' ),
 
 ), __( 'Link Color' ) );
 
@@ -176,7 +162,6 @@ add_color_rule( 'link', '#20603C', array(
 add_color_rule( 'txt', '#3C2323', array(
 
 	// Text-color
-	// Needs contrast against `bg` with more contrast
 	array( '.comment-meta .comment-metadata,
 			.entry-footer,
 			.entry-meta,
@@ -225,36 +210,31 @@ add_color_rule( 'txt', '#3C2323', array(
 			input[type="week"],
 			input[type="week"]:focus,
 			textarea,
-			textarea:focus', 'color', 'bg', 7 ),
+			textarea:focus', 'color' ),
 
 	// Background-color
-	// Needs contrast against `bg` with more contrast
-	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color', 'bg', 7 ),
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
 
 	// Border-color
-	// Needs contrast against `bg`
 	array( '.wp-block-code,
-			body .widget_eu_cookie_law_widget #eu-cookie-law', 'border-color', 'bg' ),
+			body .widget_eu_cookie_law_widget #eu-cookie-law', 'border-color' ),
 
 	// Border-top-color
-	// Needs contrast against `bg`
 	array( '.comment-list .children > li,
 			.comment-list > li,
-			.wp-block-pullquote', 'border-top-color', 'bg' ),
+			.wp-block-pullquote', 'border-top-color' ),
 
 	// Border-bottom-color
-	// Needs contrast against `bg`
 	array( '.comment-list,
 			.wp-block-pullquote,
 			hr,
-			hr.wp-block-separator', 'border-bottom-color', 'bg' ),
+			hr.wp-block-separator', 'border-bottom-color' ),
 
 	/**
 	 * Utility Classes
 	 */
 	// Foreground
-	// Needs contrast against `bg`
-	array( '.has-foreground-color[class]', 'color', 'bg' ),
+	array( '.has-foreground-color[class]', 'color' ),
 	array( '.has-foreground-background-color[class]', 'background-color' ),
 
 	// Text-color darkened
@@ -277,8 +257,7 @@ add_color_rule( 'fg1', '#655441', array(
 	 * Utility Classes
 	 */
 	// 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' ),