Browse Source

Leven: annotations clean up.
- Fix default button text color (not just white)
- Fix `"Background"` background color on editor and frontend
- Fix default "outline" button color in editor and frontend

Allan Cole 5 years ago
parent
commit
382b3083c4
2 changed files with 22 additions and 16 deletions
  1. 5 0
      leven/inc/wpcom-colors.php
  2. 17 16
      leven/inc/wpcom-editor-colors.php

+ 5 - 0
leven/inc/wpcom-colors.php

@@ -22,6 +22,11 @@ add_color_rule( 'bg', '#f7f7f6', array(
 			.wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
 			.wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
 			.wp-block-pullquote.is-style-solid-color,
+			.wp-block-button.is-style-default a.wp-block-button__link,
+			.wp-block-button.is-style-default .wp-block-button__link:active, 
+			.wp-block-button.is-style-default .wp-block-button__link:focus, 
+			.wp-block-button.is-style-default .wp-block-button__link:hover, 
+			.wp-block-button.is-style-default .wp-block-button__link:visited,
 			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'color' ),
 
 	/**

+ 17 - 16
leven/inc/wpcom-editor-colors.php

@@ -96,13 +96,14 @@ add_editor_color_rule( 'link', '#ff302c', array(
 	array( '#editor .editor-styles-wrapper .button,
 			#editor .editor-styles-wrapper .fse-template-part .main-navigation .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 .wp-block-a8c-blog-posts .entry-title a,
 			#editor .editor-styles-wrapper .is-style-outline .wp-block-button__link,
 			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link,
 			#editor .editor-styles-wrapper a', 'color' ),
 
 	// Border color left
@@ -115,7 +116,7 @@ add_editor_color_rule( 'link', '#ff302c', 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', 0.8 ),
 
 	/**
@@ -214,31 +215,31 @@ add_editor_color_rule( 'txt', '#444444', array(
 add_editor_color_rule( 'fg1', '#1285ce', array(
 
 	// Text-color
-	array( '##editor .editor-styles-wrapper .is-style-outline .wp-block-button__link.has-focus,
-			#editor .editor-styles-wrapper .is-style-outline .wp-block-button__link:focus,
-			#editor .editor-styles-wrapper .is-style-outline .wp-block-button__link:hover,
-			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:active,
+	array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:active,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:hover,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:active,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:hover,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:active,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:hover,
-			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
-			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
-			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-button .wp-block-button__link.is-style-outline.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button .wp-block-button__link.is-style-outline:focus,
+			#editor .editor-styles-wrapper .wp-block-button .wp-block-button__link.is-style-outline:hover,
 			#editor .editor-styles-wrapper a:hover', 'color' ),
 
 	// Background-color
-	array( '#editor .editor-styles-wrapper .button.has-focus,
-			#editor .editor-styles-wrapper .button:focus,
-			#editor .editor-styles-wrapper .button:hover,
-			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+	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.has-focus,
-			#editor .editor-styles-wrapper .wp-block-button__link:focus,
-			#editor .editor-styles-wrapper .wp-block-button__link:hover', 'background-color' ),
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .button.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .button:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .button:hover,
+			#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', 'background-color' ),
 
 	/**
 	 * Utility Classes