Browse Source

Dalston: General color-annotation improvements.

Allan Cole 5 years ago
parent
commit
640352ee1e
2 changed files with 23 additions and 31 deletions
  1. 16 23
      dalston/inc/wpcom-colors.php
  2. 7 8
      dalston/inc/wpcom-editor-colors.php

+ 16 - 23
dalston/inc/wpcom-colors.php

@@ -11,6 +11,7 @@ add_color_rule( 'bg', '#FFFFFF', array(
 			body .widget_eu_cookie_law_widget #eu-cookie-law,
 			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
 			.main-navigation > div > ul > li > .sub-menu,
+			.sticky-post,
 			.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:hover li > a,
@@ -25,19 +26,18 @@ add_color_rule( 'bg', '#FFFFFF', array(
 			.a8c-posts-list__view-all,
 			.a8c-posts-list__view-all:focus,
 			.a8c-posts-list__view-all:hover,
+			.a8c-posts-list__view-all.has-focus,
+			.entry .entry-content .wp-block-media-text,
 			.button,
 			.button:focus,
 			.button:hover,
-			.entry .entry-content .wp-block-media-text,
-			.has-focus.a8c-posts-list__view-all,
-			.has-focus.button,
-			.has-focus.wp-block-button__link,
-			.has-focus.wp-block-file__button,
-			.sticky-post,
-			.wp-block-button__link,
-			.wp-block-button__link:focus,
-			.wp-block-button__link:hover,
+			.button.has-focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color).has-focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color),
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):hover,
 			.wp-block-file .wp-block-file__button,
+			.wp-block-file .wp-block-file__button.has-focus,
 			.wp-block-file a.wp-block-file__button:active,
 			.wp-block-file a.wp-block-file__button:focus,
 			.wp-block-file a.wp-block-file__button:hover,
@@ -136,8 +136,7 @@ add_color_rule( 'link', '#0073AA', array(
 	array( '.a8c-posts-list-item__featured span,
 			.a8c-posts-list__view-all,
 			.button,
-			.sticky-post,
-			.wp-block-button__link,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
 			.wp-block-file .wp-block-file__button,
 			.wp-block-file__button,
 			.wp-block-pullquote.is-style-solid-color,
@@ -153,8 +152,8 @@ add_color_rule( 'link', '#0073AA', array(
 			.button:hover,
 			.has-focus.a8c-posts-list__view-all,
 			.has-focus.button,
-			.has-focus.wp-block-button__link,
-			.has-focus.wp-block-file__button,
+			.wp-block-button__link.has-focus,
+			.wp-block-file__button.has-focus,
 			.main-navigation #toggle:focus + #toggle-menu,
 			.wp-block-button__link:focus,
 			.wp-block-button__link:hover,
@@ -180,8 +179,6 @@ add_color_rule( 'link', '#0073AA', array(
 			.sticky-post,
 			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
 			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active,
-			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
-			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color):active,
 			.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:focus,
@@ -204,12 +201,9 @@ add_color_rule( 'link', '#0073AA', array(
 			.footer-navigation .footer-menu a:hover,
 			.main-navigation a:hover,
 			.site-info a:hover,
-			.wp-block-button.is-style-outline .wp-block-button__link.has-focus,
-			.wp-block-button.is-style-outline .wp-block-button__link:focus,
-			.wp-block-button.is-style-outline .wp-block-button__link:hover,
-			.wp-block-button.is-style-outline.wp-block-button__link.has-focus,
-			.wp-block-button.is-style-outline.wp-block-button__link:focus,
-			.wp-block-button.is-style-outline.wp-block-button__link:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
 			.wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
 			.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
 			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
@@ -415,8 +409,7 @@ add_color_rule( 'fg1', '#0d1b24', array(
  */
 function dalston_custom_colors_extra_css() { ?>
 
-	.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color), 
-	.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
+	.wp-block-button.is-style-outline .wp-block-button__link.has-text-color {
 		color: currentColor;
 	}
 

+ 7 - 8
dalston/inc/wpcom-editor-colors.php

@@ -19,10 +19,10 @@ add_editor_color_rule( 'bg', '#FFFFFF', array(
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
-			#editor .editor-styles-wrapper .wp-block-button__link,
-			#editor .editor-styles-wrapper .wp-block-button__link.has-focus,
-			#editor .editor-styles-wrapper .wp-block-button__link:focus,
-			#editor .editor-styles-wrapper .wp-block-button__link:hover,
+			#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.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
 			#editor .editor-styles-wrapper .wp-block-media-text,
 			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
 
@@ -70,13 +70,12 @@ 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__link,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
 			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
 
 	// Text-color
-	array( '#editor .editor-styles-wrapper .is-style-outline .wp-block-button__link,
-			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
-			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
+	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 a', 'color' ),
 
 	// Border color left