浏览代码

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

Photos: Update styles for buttons
Laurel 6 年之前
父节点
当前提交
4e04fa5580
共有 2 个文件被更改,包括 10 次插入18 次删除
  1. 4 1
      photos/blocks.css
  2. 6 17
      photos/editor-blocks.css

+ 4 - 1
photos/blocks.css

@@ -363,7 +363,6 @@ p.has-drop-cap:not(:focus):first-letter {
 /* Buttons */
 .wp-block-file .wp-block-file__button,
 .wp-block-button .wp-block-button__link {
-	border-radius: 4px;
 	font-weight: bold;
 	font-size: inherit;
 	line-height: 1.5;
@@ -374,6 +373,10 @@ p.has-drop-cap:not(:focus):first-letter {
 		color 150ms ease-in-out;
 }
 
+.wp-block-file .wp-block-file__button {
+	border-radius: 4px;
+}
+
 .rtl .wp-block-file .wp-block-file__button,
 .rtl .wp-block-button .wp-block-button__link {
 	margin-left: 0;

+ 6 - 17
photos/editor-blocks.css

@@ -606,7 +606,6 @@ blockquote p:last-child {
 /* Buttons and File block */
 .wp-block-file .wp-block-file__button,
 .wp-block-button .wp-block-button__link {
-	border-radius: 4px;
 	font-weight: bold;
 	line-height: 1.5;
 	padding: 0.5em 0.75em;
@@ -615,6 +614,10 @@ blockquote p:last-child {
 		color 150ms ease-in-out;
 }
 
+.wp-block-file .wp-block-file__button {
+	border-radius: 4px;
+}
+
 .wp-block-file__textlink {
 	text-decoration: underline;
 }
@@ -630,27 +633,13 @@ blockquote p:last-child {
 	color: #d63031;
 }
 
-.wp-block-file .wp-block-file__button:active,
-.wp-block-file .wp-block-file__button:focus,
-.wp-block-file .wp-block-file__button:hover,
-.wp-block-button__link:not(.has-text-color):active,
-.wp-block-button__link:not(.has-text-color):focus,
-.wp-block-button__link:not(.has-text-color):hover {
-	color: #fff;
-}
-
 .wp-block-file .wp-block-file__button,
 .wp-block-button__link:not(.has-background) {
 	background: #f0f0f0;
 }
 
-.wp-block-file .wp-block-file__button:active,
-.wp-block-file .wp-block-file__button:focus,
-.wp-block-file .wp-block-file__button:hover,
-.wp-block-button__link:not(.has-background):active,
-.wp-block-button__link:not(.has-background):focus,
-.wp-block-button__link:not(.has-background):hover {
-	background-color: #d63031;
+.wp-block-button.is-style-outline .wp-block-button__link {
+	background: transparent;
 }
 
 /* Classic Editor */