Переглянути джерело

Merge branch 'add/color-annotations-leven' of https://github.com/Automattic/themes into add/color-annotations-leven

Allan Cole 5 роки тому
батько
коміт
8338f05400
1 змінених файлів з 104 додано та 3 видалено
  1. 104 3
      leven/inc/wpcom-colors.php

+ 104 - 3
leven/inc/wpcom-colors.php

@@ -46,6 +46,47 @@ add_color_rule( 'bg', '#f7f7f6', array(
 	// Background-color lightened
 	array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
 
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Border-color
+	array( '.wp-block-code,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			input[type="color"],
+			input[type="date"],
+			input[type="datetime"],
+			input[type="datetime-local"],
+			input[type="email"],
+			input[type="month"],
+			input[type="number"],
+			input[type="password"],
+			input[type="range"],
+			input[type="search"],
+			input[type="tel"],
+			input[type="text"],
+			input[type="time"],
+			input[type="url"],
+			input[type="week"],
+			select,
+			textarea', 'border-color', '-1' ),
+	// Border-top-color
+	array( '.comment-list .children > li,
+			.comment-list > li,
+			.wp-block-pullquote', 'border-top-color', '-1' ),
+	// Border-bottom-color
+	array( '.comment-list,
+			.wp-block-pullquote,
+			hr,
+			hr.wp-block-separator', 'border-bottom-color', '-1' ),
+	// Color
+	array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
+	// Background-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover', '-1' ),
+
+
 ), __( 'Background Color' ) );
 
 // Link Color
@@ -138,13 +179,16 @@ add_color_rule( 'txt', '#444444', array(
 			input[type="week"],
 			input[type="week"]:focus,
 			textarea,
-			textarea:focus', 'color' ),
+			textarea:focus,
+			.main-navigation a:hover,
+			.site-title', 'color' ),
 
 	// Background-color
 	array( '.has-foreground-background-color[class],
 			.wp-block-cover,
 			.wp-block-cover-image,
-			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			.main-navigation #toggle:focus + #toggle-menu', 'background-color' ),
 
 	/**
 	 * Utility Classes
@@ -163,6 +207,38 @@ add_color_rule( 'txt', '#444444', array(
 	// Background-color brightened
 	array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
 
+	/**
+	 * Gray (Same as text color)
+	 */
+	// Text-color
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
+			.entry-footer,
+			.entry-meta,
+			.footer-navigation .footer-menu,
+			.has-foreground-light-color[class],
+			.site-branding,
+			.site-info,
+			.wp-block-image figcaption,
+			.wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			.wp-block-pullquote .wp-block-pullquote__citation,
+			.wp-block-pullquote cite,
+			.wp-block-pullquote footer,
+			.wp-block-quote .wp-block-quote__citation,
+			.wp-block-quote cite,
+			.wp-block-quote footer,
+			.wp-block-quote.is-large .wp-block-quote__citation,
+			.wp-block-quote.is-large cite,
+			.wp-block-quote.is-large footer,
+			.wp-block-quote.is-style-large .wp-block-quote__citation,
+			.wp-block-quote.is-style-large cite,
+			.wp-block-quote.is-style-large footer,
+			.wp-block-table figcaption,
+			.wp-block-video figcaption,
+			figcaption', 'color' ),
+
 ), __( 'Text Color' ) );
 
 // Accent Color
@@ -248,4 +324,29 @@ add_color_rule( 'fg1', '#1285ce', array(
 	// Background-color
 	array( '.has-secondary-background-color[class]', 'background-color' ),
 
-), __( 'Secondary Color' ) );
+), __( 'Secondary Color' ) );
+
+/**
+ * Featured Varia Palettes
+ */
+// Light
+add_color_palette( array(
+	'#FFFFFF',
+	'#1D1E1E',
+	'#C8133E',
+	'#4E2F4B',
+), 'Light' );
+// Medium
+add_color_palette( array(
+	'#EEF4F7',
+	'#242527',
+	'#35845D',
+	'#233252',
+), 'Medium' );
+// Dark
+add_color_palette( array(
+	'#1F2527',
+	'#FFFFFF',
+	'#9FD3E8',
+	'#FBE6AA',
+), 'Dark' );