浏览代码

Remove color contrast rules.

Kjell Reigstad 5 年之前
父节点
当前提交
5f02ea59d2
共有 1 个文件被更改,包括 16 次插入33 次删除
  1. 16 33
      rivington/inc/wpcom-colors.php

+ 16 - 33
rivington/inc/wpcom-colors.php

@@ -13,7 +13,6 @@ add_color_rule( 'bg', '#060f29', 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,
@@ -86,31 +85,24 @@ add_color_rule( 'bg', '#060f29', array(
 			textarea:focus,
 			textarea:focus,
 			.site-header .main-navigation > div > ul > li.current-menu-item li > a,
 			.site-header .main-navigation > div > ul > li.current-menu-item li > a,
 			.site-header .main-navigation > div > ul > li.focus li > a,
 			.site-header .main-navigation > div > ul > li.focus li > a,
-			.site-header .main-navigation > div > ul > li:hover li > a', 'color', 'link' ),
+			.site-header .main-navigation > div > ul > li:hover li > a', 'color' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Text-color
 	// Text-color
 	// Needs contrast against `link` (primary)
 	// 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
@@ -143,7 +135,6 @@ add_color_rule( 'link', '#CAAB57', array(
 			.site-header .main-navigation > div > ul > li:hover li > a', 'background-color' ),
 			.site-header .main-navigation > div > ul > li:hover li > a', 'background-color' ),
 
 
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg`
 	array( '.a8c-posts-list .a8c-posts-list-item__title a:active,
 	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:focus,
 			.a8c-posts-list .a8c-posts-list-item__title a:hover,
 			.a8c-posts-list .a8c-posts-list-item__title a:hover,
@@ -166,22 +157,19 @@ add_color_rule( 'link', '#CAAB57', array(
 			a,
 			a,
 			.site-header .main-navigation > div > ul > li.current-menu-item > a,
 			.site-header .main-navigation > div > ul > li.current-menu-item > a,
 			.site-header .main-navigation > div > ul > li.focus > a,
 			.site-header .main-navigation > div > ul > li.focus > a,
-			.site-header .main-navigation > div > ul > li:hover > a', 'color', 'bg' ),
+			.site-header .main-navigation > div > ul > li:hover > a', '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( '.site-header .main-navigation > div > ul > li.current-menu-item > ul:before,
 	array( '.site-header .main-navigation > div > ul > li.current-menu-item > ul:before,
 			.site-header .main-navigation > div > ul > li.focus > ul:before,
 			.site-header .main-navigation > div > ul > li.focus > ul:before,
-			.site-header .main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color', 'bg' ),
+			.site-header .main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
@@ -189,8 +177,7 @@ add_color_rule( 'link', '#CAAB57', 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' ) );
 
 
@@ -199,7 +186,6 @@ add_color_rule( 'link', '#CAAB57', array(
 add_color_rule( 'txt', '#f2f2f2', array(
 add_color_rule( 'txt', '#f2f2f2', array(
 
 
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg` with more contrast
 	array( '.comment-meta .comment-metadata,
 	array( '.comment-meta .comment-metadata,
 			.main-navigation,
 			.main-navigation,
 			.main-navigation a,
 			.main-navigation a,
@@ -214,19 +200,17 @@ add_color_rule( 'txt', '#f2f2f2', array(
 			.wp-block-pullquote,
 			.wp-block-pullquote,
 			body,
 			body,
 			body .widget_eu_cookie_law_widget #eu-cookie-law,
 			body .widget_eu_cookie_law_widget #eu-cookie-law,
-			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept', 'color', 'bg', 7 ),
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept', 'color' ),
 
 
 	// Background-color
 	// Background-color
-	// Needs contrast against `bg` with more contrast
 	array( '.has-foreground-background-color[class],
 	array( '.has-foreground-background-color[class],
-			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color', 'bg', 7 ),
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-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
@@ -249,8 +233,7 @@ add_color_rule( 'fg1', '#EE4266', array(
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Text-color
 	// Text-color
-	// Needs contrast against `bg`
-	array( '.has-secondary-color[class]', 'color', 'bg' ),
+	array( '.has-secondary-color[class]', 'color' ),
 
 
 	// Background-color
 	// Background-color
 	array( '.has-secondary-background-color[class]', 'background-color' ),
 	array( '.has-secondary-background-color[class]', 'background-color' ),