Browse Source

Merge pull request #2507 from Automattic/update/seedlet-comments

Seedlet: Update the color annotations
Ben Dwyer 4 years ago
parent
commit
f9746bdf86
3 changed files with 42 additions and 35 deletions
  1. 26 23
      seedlet/inc/wpcom-colors.php
  2. 10 6
      seedlet/inc/wpcom-editor-colors.php
  3. 6 6
      seedlet/style.css

+ 26 - 23
seedlet/inc/wpcom-colors.php

@@ -1,10 +1,10 @@
-<?php 
+<?php
 
 /*
  * Custom Colors: Seedlet
  */
 
-// Background Color 
+// Background Color
 // --global--color-background
 add_color_rule( 'bg', '#FFFFFF', array(
 
@@ -91,7 +91,7 @@ add_color_rule( 'bg', '#FFFFFF', array(
 ), __( 'Background Color' ) );
 
 // Foreground Color
-// --global--color-background
+// --global--color-foreground-light
 add_color_rule( 'txt', '#444444', array(
 
 	// Text-color
@@ -102,6 +102,7 @@ add_color_rule( 'txt', '#444444', array(
 			.has-background-dark-background-color[class],
 			.has-foreground-color[class],
 			.has-tertiary-background-color[class],
+			.has-tertiary-background-color[class]:not(.has-text-color),
 			.navigation,
 			.pagination .nav-links > *,
 			.post-navigation .meta-nav,
@@ -118,6 +119,8 @@ add_color_rule( 'txt', '#444444', array(
 			.wp-block-pullquote,
 			.wp-block-search .wp-block-search__input,
 			.wp-block-search .wp-block-search__input:focus,
+			.wp-block-latest-posts .wp-block-latest-posts__post-author,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
 			body,
 			input[type="color"],
 			input[type="color"]:focus,
@@ -154,7 +157,7 @@ add_color_rule( 'txt', '#444444', array(
 
 	// Background-color
 	array( '.wp-block-pullquote.is-style-solid-color,
-			.wp-block-cover-image.has-background-dim, 
+			.wp-block-cover-image.has-background-dim,
 			.wp-block-cover.has-background-dim', 'background-color' ),
 
 	// Border-bottom-color
@@ -302,7 +305,7 @@ add_color_rule( 'fg1', '#3C8067', array(
 			input[type="submit"]', 'background-color' ),
 
 	// Border-color
-	array( '.primary-navigation .menu-item > a:hover, 
+	array( '.primary-navigation .menu-item > a:hover,
 			.woo-navigation .menu-item > a:hover,
 			.entry-meta a:hover,
 			.entry-footer a:hover,
@@ -320,10 +323,10 @@ add_color_rule( 'fg1', '#3C8067', array(
 
 	// Outline-color
 	array( '.site :focus', 'outline-color' ),
-	
+
 	// Background-image
 	array( '.site-title a', 'Background-image' ),
-	
+
 	// Text-decoration-color
 	array( '.site-title > a', 'text-decoration-color' ),
 
@@ -458,7 +461,7 @@ add_color_rule( 'fg2', '#FAFBF6', array(
 ), __( 'Tertiary Color' ) );
 
 /**
- * Custom CSS. 
+ * Custom CSS.
  * The plugin takes the body of this function and applies it in a style tag in the document head.
  */
 function seedlet_custom_colors_extra_css() {
@@ -467,24 +470,24 @@ function seedlet_custom_colors_extra_css() {
 	$color_fg1 = $colors_array['colors']['fg1'];
 	$color_fg2 = $colors_array['colors']['fg2']; ?>
 
-	/* 
-	 * Site title text shadow. 
+	/*
+	 * Site title text shadow.
 	*/
 	.site-title a {
 		background-image: linear-gradient(to right, <?php echo $color_fg1; ?> 100%, transparent 100%);
-		text-shadow: 1px 0px <?php echo $color_bg; ?>, 
-					 -1px 0px <?php echo $color_bg; ?>, 
-					 -2px 0px <?php echo $color_bg; ?>, 
-					 2px 0px <?php echo $color_bg; ?>, 
-					 -3px 0px <?php echo $color_bg; ?>, 
-					 3px 0px <?php echo $color_bg; ?>, 
-					 -4px 0px <?php echo $color_bg; ?>, 
-					 4px 0px <?php echo $color_bg; ?>, 
-					 -5px 0px <?php echo $color_bg; ?>, 
+		text-shadow: 1px 0px <?php echo $color_bg; ?>,
+					 -1px 0px <?php echo $color_bg; ?>,
+					 -2px 0px <?php echo $color_bg; ?>,
+					 2px 0px <?php echo $color_bg; ?>,
+					 -3px 0px <?php echo $color_bg; ?>,
+					 3px 0px <?php echo $color_bg; ?>,
+					 -4px 0px <?php echo $color_bg; ?>,
+					 4px 0px <?php echo $color_bg; ?>,
+					 -5px 0px <?php echo $color_bg; ?>,
 					 5px 0px <?php echo $color_bg; ?>;
 	}
 
-	/* 
+	/*
 	 * Custom gradients.
 	*/
 	.has-hard-diagonal-gradient-background {
@@ -535,7 +538,7 @@ add_color_palette( array(
 	'#C8133E',
 	'#4E2F4B',
 	'#F9F9F9',
-), 'Light' );
+), /* translators: This is the name for a color scheme */ 'Light' );
 // Medium
 add_color_palette( array(
 	'#EEF4F7',
@@ -543,7 +546,7 @@ add_color_palette( array(
 	'#35845D',
 	'#233252',
 	'#F9F9F9',
-), 'Medium' );
+), /* translators: This is the name for a color scheme */ 'Medium' );
 // Dark
 add_color_palette( array(
 	'#1F2527',
@@ -551,4 +554,4 @@ add_color_palette( array(
 	'#9FD3E8',
 	'#FBE6AA',
 	'#364043',
-), 'Dark' );
+), /* translators: This is the name for a color scheme */ 'Dark' );

+ 10 - 6
seedlet/inc/wpcom-editor-colors.php

@@ -4,7 +4,7 @@
  * Custom Editor Colors: Seedlet
  */
 
-// Background Color 
+// Background Color
 // --global--color-background
 add_color_rule( 'bg', '#FFFFFF', array(
 
@@ -67,7 +67,7 @@ add_color_rule( 'bg', '#FFFFFF', array(
 ), __( 'Background Color' ) );
 
 // Foreground Color
-// --global--color-background
+// --global--color-foreground-light
 add_color_rule( 'txt', '#444444', array(
 
 	// Text-color
@@ -85,7 +85,11 @@ add_color_rule( 'txt', '#444444', array(
 			#editor .editor-styles-wrapper blockquote footer,
 			#editor .editor-styles-wrapper figcaption,
 			#editor .editor-styles-wrapper .editor-post-title .editor-post-title__input,
-			#editor .editor-styles-wrapper .editor-post-title .editor-post-title__input::placeholder', 'color' ),
+			#editor .editor-styles-wrapper .editor-post-title .editor-post-title__input::placeholder
+			#editor .editor-styles-wrapper .has-tertiary-background-color[class],
+			#editor .editor-styles-wrapper .has-tertiary-background-color[class] a,
+			#editor .editor-styles-wrapper .has-tertiary-background-color[class]:not(.has-text-color)
+			#editor .editor-styles-wrapper .has-tertiary-background-color[class]:not(.has-text-color) a', 'color' ),
 
 	// Background-color
 	array( '#editor .editor-styles-wrapper .wp-block-cover,
@@ -175,7 +179,7 @@ add_color_rule( 'fg1', '#3C8067', array(
 	// border-bottom-color
 	array( '#editor .editor-styles-wrapper .wp-block-file .wp-block-file__textlink,
 			#editor .editor-styles-wrapper a', 'border-bottom-color' ),
-	
+
 	// border-left-color
 	array( '#editor .editor-styles-wrapper .wp-block-quote,
 			#editor .editor-styles-wrapper .wp-block-quote.is-large,
@@ -229,7 +233,7 @@ function seedlet_custom_colors_extra_css() {
 	$color_fg1 = $colors_array['colors']['fg1'];
 	$color_fg2 = $colors_array['colors']['fg2']; ?>
 
-	/* 
+	/*
 	 * Custom gradients.
 	*/
 	#editor .editor-styles-wrapper .has-hard-diagonal-gradient-background {
@@ -268,4 +272,4 @@ function seedlet_custom_colors_extra_css() {
 		background: linear-gradient(to bottom, transparent 20%, <?php echo $color_fg1; ?> 20%, <?php echo $color_fg1; ?> 80%, transparent 80%);
 	}
 <?php }
-add_theme_support( 'custom_colors_extra_css', 'seedlet_custom_colors_extra_css' );
+add_theme_support( 'custom_colors_extra_css', 'seedlet_custom_colors_extra_css' );

+ 6 - 6
seedlet/style.css

@@ -29,13 +29,13 @@ GNU General Public License for more details.
 Seedlet is derived from Twenty Nineteen. 2018-2020 WordPress.org
 Twenty Nineteen is distributed under the terms of the GNU GPL v2 or later.
 
-Seedlet is also based on Underscores https://underscores.me/, (C) 2012-2018 Automattic, Inc. 
+Seedlet is also based on Underscores https://underscores.me/, (C) 2012-2018 Automattic, Inc.
 Underscores is distributed under the terms of the GNU GPL v2 or later.
 
 Normalizing styles have been helped along thanks to the fine work of
 Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
 
-Unless otherwise noted, the icons in this theme are derived from the 
+Unless otherwise noted, the icons in this theme are derived from the
 WordPress Icons Library, licensed under the terms of the GNU GPL v2 or later.
 https://github.com/WordPress/gutenberg/tree/master/packages/icons
 
@@ -55,7 +55,7 @@ Included as part of the following classes and functions:
 
 Color Contrast Validation
 Copyright (C) 2016 Per Soderlind
-License: GNU General Public License v3 
+License: GNU General Public License v3
 License URI: http://www.gnu.org/licenses/gpl-3.0.html
 Source: https://github.com/soderlind/2016-customizer-demo
 Included as part of the following classes and functions:
@@ -2399,7 +2399,7 @@ table th,
 
 /* Block Alignments */
 /**
- * These selectors set the default max width for content appearing inside a post or page. 
+ * These selectors set the default max width for content appearing inside a post or page.
  */
 /**
  * .alignleft
@@ -2778,8 +2778,8 @@ table th,
 	padding-left: var(--global--spacing-vertical) !important;
 }
 
-/* 
- * Custom gradients 
+/*
+ * Custom gradients
 */
 .has-hard-diagonal-gradient-background {
 	background: linear-gradient(to bottom right, var(--global--color-secondary) 49.9%, var(--global--color-tertiary) 50%);