Browse Source

Dalston: Various tweaks and improvements to color annotations.

Allan Cole 4 năm trước cách đây
mục cha
commit
ab7d160158
2 tập tin đã thay đổi với 18 bổ sung5 xóa
  1. 3 3
      dalston/inc/wpcom-colors.php
  2. 15 2
      dalston/inc/wpcom-editor-colors.php

+ 3 - 3
dalston/inc/wpcom-colors.php

@@ -338,7 +338,7 @@ add_color_rule( 'txt', '#1e1e1e', array(
 	// Background
 	array( '.has-background-dim,
 			.has-foreground-background-color[class],
-			.has-foreground-background-color[class].has-background-dim,', 'background-color' ),
+			.has-foreground-background-color[class].has-background-dim', 'background-color' ),
 
 	// Text-color darkened
 	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
@@ -423,8 +423,8 @@ function dalston_custom_colors_extra_css() { ?>
 			border: 0;
 		}
  	}
- <?php }
- add_theme_support( 'custom_colors_extra_css', 'dalston_custom_colors_extra_css' ); 
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'dalston_custom_colors_extra_css' ); 
 
 /**
  * Featured Varia Palettes

+ 15 - 2
dalston/inc/wpcom-editor-colors.php

@@ -70,12 +70,13 @@ add_editor_color_rule( 'link', '#0073AA', array(
 	// Background-color
 	array( '#editor .editor-styles-wrapper .button,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
-			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background-color),
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
 			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
 
 	// Text-color
 	array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
-			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
 			#editor .editor-styles-wrapper a', 'color' ),
 
 	// Border color left
@@ -167,3 +168,15 @@ add_editor_color_rule( 'fg1', '#0d1b24', array(
 	array( '#editor .editor-styles-wrapper .has-secondary-background-color[class]', 'background-color' ),
 
 ), __( 'Secondary Color' ) );
+
+/**
+ * Custom CSS
+ */
+function dalston_editor_custom_colors_extra_css() { ?>
+	#editor .editor-styles-wrapper .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
+	#editor .editor-styles-wrapper p.has-text-color a {
+		color: currentColor;
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'dalston_editor_custom_colors_extra_css' ); 
+