Jelajahi Sumber

Merge pull request #565 from Automattic/fixes/434-correct-button-styles

Rebalance: Update styles for buttons
Laurel 6 tahun lalu
induk
melakukan
8d16fa6640
2 mengubah file dengan 19 tambahan dan 24 penghapusan
  1. 10 5
      rebalance/blocks.css
  2. 9 19
      rebalance/editor-blocks.css

+ 10 - 5
rebalance/blocks.css

@@ -259,8 +259,6 @@ p.has-drop-cap:not(:focus)::first-letter {
 /* Buttons */
 
 .wp-block-button .wp-block-button__link {
-	border: 2px solid;
-	border-radius: 0;
 	font-family: "Rubik", "Helvetica Neue", sans-serif;
 	font-weight: 500;
 	line-height: 1;
@@ -274,9 +272,16 @@ p.has-drop-cap:not(:focus)::first-letter {
 	text-decoration: none;
 }
 
-a.wp-block-button__link {
-	background: #fff;
-	border-color: #000;
+.entry-content .wp-block-button__link {
+	background: #f35029;
+	color: #fff;
+}
+
+.entry-content .is-style-outline .wp-block-button__link {
+	background: transparent;
+}
+
+.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) {
 	color: #f35029;
 }
 

+ 9 - 19
rebalance/editor-blocks.css

@@ -473,13 +473,6 @@
 	-webkit-appearance: none;
 }
 
-.wp-block-file .wp-block-file__button:hover,
-.wp-block-file .wp-block-file__button:focus,
-.wp-block-file .wp-block-file__button:active {
-	background: #000;
-	color: #fff;
-}
-
 .rtl .wp-block-file .wp-block-file__button {
 	margin-left: .75em;
 	margin-right: 0;
@@ -682,8 +675,6 @@
 /* Buttons */
 
 .wp-block-button .wp-block-button__link {
-	border: 2px solid;
-	border-radius: 0;
 	font-family: "Rubik", "Helvetica Neue", sans-serif;
 	font-weight: 500;
 	line-height: 18px;
@@ -694,18 +685,17 @@
 	line-height: 18px
 }
 
-.wp-block-button__link,
-.wp-block-button__link:visited {
-	background: #fff;
-	border-color: currentColor;
-	color: #f35029;
+.wp-block-button__link {
+	color: #fff;
+	background-color: #f35029;
 }
 
-.wp-block-button__link:active,
-.wp-block-button__link:focus,
-.wp-block-button__link:hover {
-	background: #000;
-	color: #fff;
+.is-style-outline .wp-block-button__link {
+	background: transparent;
+}
+
+.is-style-outline .wp-block-button__link:not(.has-text-color) {
+	color: #f35029;
 }
 
 .wp-block-button.alignleft {