Przeglądaj źródła

Exford: Improving color annotations.

Allan Cole 5 lat temu
rodzic
commit
36c24e223f
1 zmienionych plików z 29 dodań i 43 usunięć
  1. 29 43
      exford/inc/wpcom-colors.php

+ 29 - 43
exford/inc/wpcom-colors.php

@@ -119,9 +119,9 @@ add_color_rule( 'link', '#23883D', array(
 			.page-title a:hover,
 			.page-title a:hover,
 			.site-title a:hover,
 			.site-title a:hover,
 			.social-navigation 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:not(.has-text-color),
 			.wp-block-button.is-style-outline .wp-block-button__link:active,
 			.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:not(.has-text-color),
 			.wp-block-button.is-style-outline.wp-block-button__link:active,
 			.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,
 			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
 			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
@@ -140,7 +140,8 @@ add_color_rule( 'link', '#23883D', array(
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Background-color
 	// Background-color
-	array( '.has-primary-background-color[class]', 'background-color' ),
+	array( '.has-primary-background-color[class],
+			.has-primary-background-color.has-background-dim[class]', 'background-color' ),
 	// Text-color
 	// Text-color
 	array( '.has-primary-color[class]', 'color' ),
 	array( '.has-primary-color[class]', 'color' ),
 
 
@@ -162,63 +163,44 @@ add_color_rule( 'txt', '#111111', array(
 			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,
 			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' ),
+			.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			table.is-style-stripes tbody tr:nth-child(odd)', 'color' ),
 
 
 	// Background-color
 	// Background-color
 	array( '.wp-block-cover,
 	array( '.wp-block-cover,
 			.wp-block-cover-image,
 			.wp-block-cover-image,
+			.wp-block-cover-image.has-background-dim,
+			.wp-block-cover.has-background-dim,
 			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
 			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
 
 
 	/**
 	/**
 	 * Utility Classes
 	 * Utility Classes
 	 */
 	 */
 	// Foreground
 	// Foreground
-	array( '.has-foreground-color[class],
-			.has-background-background-color[class],
+	array( '.has-background-background-color[class],
+			.has-background-background-color.has-background-dim[class],
 			.has-background-dark-background-color[class],
 			.has-background-dark-background-color[class],
-			.has-background-light-background-color[class]', 'color' ),
-	array( '.has-foreground-background-color[class]', 'background-color' ),
+			.has-background-dark-background-color.has-background-dim[class],
+			.has-background-light-background-color[class],
+			.has-background-light-background-color.has-background-dim[class],
+			.has-foreground-color[class]', 'color' ),
+	// Background-color
+	array( '.has-background-dim[class],
+			.has-foreground-background-color[class],
+			.has-foreground-background-color.has-background-dim[class],
+			.has-foreground-background-color[class]', 'background-color' ),
 
 
 	// Text-color darkened
 	// Text-color darkened
 	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
 	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
 	// Background-color darkened
 	// Background-color darkened
-	array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
+	array( '.has-foreground-dark-background-color[class],
+			.has-foreground-dark-background-color.has-background-dim[class]', 'background-color', '-1' ),
 
 
 	// Text-color brightened
 	// Text-color brightened
 	array( '.has-foreground-light-color[class]', 'color', '+2' ),
 	array( '.has-foreground-light-color[class]', 'color', '+2' ),
 	// Background-color brightened
 	// Background-color brightened
-	array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
+	array( '.has-foreground-light-background-color[class],
+			.has-foreground-light-background-color.has-background-dim[class]', 'background-color', '+2' ),
 
 
 	/*
 	/*
 	 * Gray (Same as text color)
 	 * Gray (Same as text color)
@@ -266,7 +248,10 @@ add_color_rule( 'txt', '#111111', array(
 			.wp-block-quote.is-style-large cite,
 			.wp-block-quote.is-style-large cite,
 			.wp-block-quote.is-style-large footer,
 			.wp-block-quote.is-style-large footer,
 			.wp-block-video figcaption,
 			.wp-block-video figcaption,
-			figcaption', 'color' ),
+			figcaption', 'color', '+2' ),
+			
+	// Text color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color', '-1' ),
 
 
 ), __( 'Text Color' ) );
 ), __( 'Text Color' ) );
 
 
@@ -348,7 +333,8 @@ add_color_rule( 'fg1', '#0963C4', array(
 	array( '.has-secondary-color[class]', 'color' ),
 	array( '.has-secondary-color[class]', 'color' ),
 
 
 	// Background-color
 	// Background-color
-	array( '.has-secondary-background-color[class]', 'background-color' ),
+	array( '.has-secondary-background-color[class],
+			.has-secondary-background-color.has-background-dim[class]', 'background-color' ),
 
 
 ), __( 'Secondary Color' ) );
 ), __( 'Secondary Color' ) );