Browse Source

Remove contrast annotations

Kjell Reigstad 5 years ago
parent
commit
1f2d56b8f7
1 changed files with 18 additions and 38 deletions
  1. 18 38
      brompton/inc/wpcom-colors.php

+ 18 - 38
brompton/inc/wpcom-colors.php

@@ -14,7 +14,6 @@ add_color_rule( 'bg', '#E8E4DD', array(
 			.main-navigation > div > ul > li > .sub-menu', 'background-color' ),
 			.main-navigation > div > ul > li > .sub-menu', 'background-color' ),
 
 
 	// Text-color
 	// Text-color
-	// Needs contrast against `link` (primary)
 	array( '.a8c-posts-list-item__featured span,
 	array( '.a8c-posts-list-item__featured span,
 			.a8c-posts-list__view-all,
 			.a8c-posts-list__view-all,
 			.a8c-posts-list__view-all:focus,
 			.a8c-posts-list__view-all:focus,
@@ -59,31 +58,23 @@ add_color_rule( 'bg', '#E8E4DD', array(
 			input.has-focus[type="submit"],
 			input.has-focus[type="submit"],
 			input:focus[type="submit"],
 			input:focus[type="submit"],
 			input:hover[type="submit"],
 			input:hover[type="submit"],
-			input[type="submit"]', 'color', 'link' ),
+			input[type="submit"]' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Text-color
 	// 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-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-dark-color[class],
 			.has-background-light-color[class],
 			.has-background-light-color[class],
 			.has-background-background-color[class],
 			.has-background-background-color[class],
 			.has-background-dark-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
 	// Background-color
 	array( '.has-background-background-color[class]', 'background-color' ),
 	array( '.has-background-background-color[class]', 'background-color' ),
 	// Background-color darkened
 	// Background-color darkened
@@ -124,7 +115,6 @@ add_color_rule( 'link', '#C04239', array(
 			input:hover[type="submit"]', 'background-color' ),
 			input:hover[type="submit"]', 'background-color' ),
 
 
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg`
 	array( '.a8c-posts-list .a8c-posts-list-item__meta a:active,
 	array( '.a8c-posts-list .a8c-posts-list-item__meta a:active,
 			.a8c-posts-list .a8c-posts-list-item__meta a:focus,
 			.a8c-posts-list .a8c-posts-list-item__meta a:focus,
 			.a8c-posts-list .a8c-posts-list-item__meta a:hover,
 			.a8c-posts-list .a8c-posts-list-item__meta a:hover,
@@ -163,27 +153,23 @@ add_color_rule( 'link', '#C04239', array(
 			a,
 			a,
 			article .entry-header .entry-title a:active,
 			article .entry-header .entry-title a:active,
 			article .entry-header .entry-title a:focus,
 			article .entry-header .entry-title a:focus,
-			article .entry-header .entry-title a:hover', 'color', 'bg' ),
+			article .entry-header .entry-title a:hover', 'color' ),
 
 
 	// Border color left
 	// 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
 	// Border color right
-	// Needs contrast against `bg`
 	array( '.wp-block-quote[style*="text-align: right"],
 	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
 	// Border color bottom
-	// Needs contrast against `bg`
 	array( '#colophon .site-info,
 	array( '#colophon .site-info,
-			#masthead', 'border-bottom-color', 'bg' ),
+			#masthead', 'border-bottom-color' ),
 
 
 	// Border color top
 	// Border color top
-	// Needs contrast against `bg`
 	array( '#colophon .footer-navigation,
 	array( '#colophon .footer-navigation,
 			#colophon .site-info,
 			#colophon .site-info,
-			#masthead', 'border-top-color', 'bg' ),
+			#masthead', 'border-top-color' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
@@ -191,8 +177,7 @@ add_color_rule( 'link', '#C04239', array(
 	// Background-color
 	// Background-color
 	array( '.has-primary-background-color[class]', 'background-color' ),
 	array( '.has-primary-background-color[class]', 'background-color' ),
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg`
-	array( '.has-primary-color[class]', 'color', 'bg' ),
+	array( '.has-primary-color[class]', 'color' ),
 
 
 ), __( 'Link Color' ) );
 ), __( 'Link Color' ) );
 
 
@@ -201,7 +186,6 @@ add_color_rule( 'link', '#C04239', array(
 add_color_rule( 'txt', '#252E36', array(
 add_color_rule( 'txt', '#252E36', array(
 
 
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg` with more contrast
 	array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
 	array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
 			.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
 			.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
 			.comment-meta .comment-metadata,
 			.comment-meta .comment-metadata,
@@ -262,10 +246,9 @@ add_color_rule( 'txt', '#252E36', array(
 			input[type="week"],
 			input[type="week"],
 			input[type="week"]:focus,
 			input[type="week"]:focus,
 			textarea,
 			textarea,
-			textarea:focus', 'color', 'bg', 7 ),
+			textarea:focus', 'color' ),
 
 
 	// Background-color
 	// Background-color
-	// Needs contrast against `bg` with more contrast
 	array( '#colophon .footer-navigation,
 	array( '#colophon .footer-navigation,
 			#colophon .site-info,
 			#colophon .site-info,
 			#masthead,
 			#masthead,
@@ -285,10 +268,9 @@ add_color_rule( 'txt', '#252E36', array(
 			input[type="submit"],
 			input[type="submit"],
 			.main-navigation > div > ul > li.current-menu-item li > a,
 			.main-navigation > div > ul > li.current-menu-item li > a,
 			.main-navigation > div > ul > li.focus li > a,
 			.main-navigation > div > ul > li.focus li > a,
-			.main-navigation > div > ul > li:hover li > a', 'background-color', 'bg', 7 ),
+			.main-navigation > div > ul > li:hover li > a', 'background-color' ),
 
 
 	// Border-color
 	// Border-color
-	// Needs contrast against `bg` with more contrast
 	array( 'input[type="color"]:focus,
 	array( 'input[type="color"]:focus,
 			input[type="date"]:focus,
 			input[type="date"]:focus,
 			input[type="datetime"]:focus,
 			input[type="datetime"]:focus,
@@ -304,14 +286,13 @@ add_color_rule( 'txt', '#252E36', array(
 			input[type="time"]:focus,
 			input[type="time"]:focus,
 			input[type="url"]:focus,
 			input[type="url"]:focus,
 			input[type="week"]:focus,
 			input[type="week"]:focus,
-			textarea:focus', 'border-color', 'bg', 7 ),
+			textarea:focus', 'border-color' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Foreground
 	// 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' ),
 	array( '.has-foreground-background-color[class]', 'background-color' ),
 
 
 	// Text-color darkened
 	// Text-color darkened
@@ -334,7 +315,6 @@ add_color_rule( 'fg1', '#FFFFFF', array(
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg`
 	array( '.footer-navigation .footer-menu,
 	array( '.footer-navigation .footer-menu,
 			.has-secondary-color[class],
 			.has-secondary-color[class],
 			.main-navigation,
 			.main-navigation,
@@ -344,7 +324,7 @@ add_color_rule( 'fg1', '#FFFFFF', array(
 			.site-branding,
 			.site-branding,
 			.site-info,
 			.site-info,
 			.site-title,
 			.site-title,
-			.social-navigation a', 'color', 'bg' ),
+			.social-navigation a', 'color' ),
 
 
 	// Background-color
 	// Background-color
 	array( '.has-secondary-background-color[class],
 	array( '.has-secondary-background-color[class],