Przeglądaj źródła

Barnsbury: Cleaning up button styles.

Allan Cole 5 lat temu
rodzic
commit
b322fddc06

+ 8 - 32
barnsbury/inc/wpcom-colors.php

@@ -210,38 +210,6 @@ add_color_rule( 'txt', '#3C2323', array(
 			body .widget_eu_cookie_law_widget #eu-cookie-law,
 			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
 			hr.wp-block-separator.is-style-dots:before,
-			input[type="color"],
-			input[type="color"]:focus,
-			input[type="date"],
-			input[type="date"]:focus,
-			input[type="datetime"],
-			input[type="datetime"]:focus,
-			input[type="datetime-local"],
-			input[type="datetime-local"]:focus,
-			input[type="email"],
-			input[type="email"]:focus,
-			input[type="month"],
-			input[type="month"]:focus,
-			input[type="number"],
-			input[type="number"]:focus,
-			input[type="password"],
-			input[type="password"]:focus,
-			input[type="range"],
-			input[type="range"]:focus,
-			input[type="search"],
-			input[type="search"]:focus,
-			input[type="tel"],
-			input[type="tel"]:focus,
-			input[type="text"],
-			input[type="text"]:focus,
-			input[type="time"],
-			input[type="time"]:focus,
-			input[type="url"],
-			input[type="url"]:focus,
-			input[type="week"],
-			input[type="week"]:focus,
-			textarea,
-			textarea:focus,
 			.site-title,
 			.main-navigation > div > ul > li.current-menu-item li > a,
 			.main-navigation > div > ul > li.focus li > a,
@@ -303,6 +271,14 @@ add_color_rule( 'txt', '#3C2323', array(
 // $config-global--color-secondary-default
 add_color_rule( 'fg1', '#655441', array(
 
+	// Text-color
+	array( '.wp-block-button.is-style-outline .wp-block-button__link:focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:hover', 'color' ),
+
+	// Background-color
+	array( '.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover', 'background-color' ),
+
 	/**
 	 * Utility Classes
 	 */

+ 8 - 8
barnsbury/inc/wpcom-editor-colors.php

@@ -16,10 +16,10 @@ add_editor_color_rule( 'bg', '#FFFDF6', 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__link:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link.has-focus:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link:not(.has-text-color):focus,
+			#editor .editor-styles-wrapper .wp-block-button__link:not(.has-text-color):hover,
 			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
 
 	// Background-color
@@ -70,8 +70,8 @@ add_editor_color_rule( 'bg', '#FFFDF6', array(
 add_editor_color_rule( 'link', '#20603C', array(
 
 	// Text-color
-	array( '#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link,
-			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
+	array( '#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:not(.has-text-color),
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:active,
 			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:focus,
@@ -83,7 +83,7 @@ add_editor_color_rule( 'link', '#20603C', 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),
 			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
 			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
 
@@ -143,7 +143,7 @@ add_editor_color_rule( 'txt', '#3C2323', array(
 			#editor .editor-styles-wrapper .has-background-light-background-color,
 			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color,
 			#editor .editor-styles-wrapper .has-foreground-color,
-			#editor .editor-styles-wrapper .wp-block .has-foreground-color,', 'color' ),
+			#editor .editor-styles-wrapper .wp-block .has-foreground-color', 'color' ),
 
 	// Background-color
 	array( '#editor .editor-styles-wrapper .has-foreground-background-color,