فهرست منبع

Merge pull request #1122 from Automattic/update/varia-media-text-paragraph

Varia: Have links inherit the color only when the block (Media & Text or Paragrpah) are using a background color
Allan Cole 6 سال پیش
والد
کامیت
e6dc0b15f8

+ 13 - 1
redhill/style-editor.css

@@ -178,6 +178,10 @@ body {
 	-webkit-font-smoothing: antialiased;
 	-webkit-font-smoothing: antialiased;
 }
 }
 
 
+.editor-post-title__block {
+	font-size: 20px;
+}
+
 p {
 p {
 	font-size: 1em;
 	font-size: 1em;
 	line-height: 1.6;
 	line-height: 1.6;
@@ -444,7 +448,15 @@ object {
 	padding-left: 0;
 	padding-left: 0;
 }
 }
 
 
-.wp-block-media-text .block-editor-inner-blocks a {
+.wp-block-media-text[style*="background-color"]:not(.has-background-background-color) .block-editor-inner-blocks a {
+	color: currentColor;
+}
+
+p.has-background {
+	padding: 16px 16px;
+}
+
+p.has-background:not(.has-background-background-color) a {
 	color: currentColor;
 	color: currentColor;
 }
 }
 
 

+ 5 - 1
redhill/style-rtl.css

@@ -1585,7 +1585,7 @@ dd {
 	margin-bottom: 0;
 	margin-bottom: 0;
 }
 }
 
 
-.wp-block-media-text .wp-block-media-text__content a {
+.wp-block-media-text[class*="background-color"]:not(.has-background-background-color) .wp-block-media-text__content a, .wp-block-media-text[style*="background-color"] .wp-block-media-text__content a {
 	color: currentColor;
 	color: currentColor;
 }
 }
 
 
@@ -1604,6 +1604,10 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	padding: calc( 3 * 16px) 0;
 	margin-right: 0;
 	margin-right: 0;

+ 5 - 1
redhill/style.css

@@ -1585,7 +1585,7 @@ dd {
 	margin-bottom: 0;
 	margin-bottom: 0;
 }
 }
 
 
-.wp-block-media-text .wp-block-media-text__content a {
+.wp-block-media-text[class*="background-color"]:not(.has-background-background-color) .wp-block-media-text__content a, .wp-block-media-text[style*="background-color"] .wp-block-media-text__content a {
 	color: currentColor;
 	color: currentColor;
 }
 }
 
 
@@ -1604,6 +1604,10 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	padding: calc( 3 * 16px) 0;
 	margin-left: 0;
 	margin-left: 0;

+ 1 - 0
varia/sass/blocks/_editor.scss

@@ -14,6 +14,7 @@
 @import "gallery/editor";
 @import "gallery/editor";
 @import "latest-posts/editor";
 @import "latest-posts/editor";
 @import "media-text/editor";
 @import "media-text/editor";
+@import "paragraph/editor";
 @import "pullquote/editor";
 @import "pullquote/editor";
 @import "quote/editor";
 @import "quote/editor";
 @import "separator/editor";
 @import "separator/editor";

+ 2 - 2
varia/sass/blocks/media-text/_editor.scss

@@ -1,10 +1,10 @@
 .wp-block-media-text {
 .wp-block-media-text {
 
 
-	&[style*="background-color"]:not(.has-background-background-color) {
+  &[style*="background-color"]:not(.has-background-background-color) {
 		.block-editor-inner-blocks {
 		.block-editor-inner-blocks {
 			a {
 			a {
 				color: currentColor;
 				color: currentColor;
 			}
 			}
 		}
 		}
 	}
 	}
-}
+}

+ 1 - 1
varia/sass/blocks/media-text/_style.scss

@@ -43,4 +43,4 @@
 			padding: 0 #{map-deep-get($config-global, "spacing", "horizontal")};
 			padding: 0 #{map-deep-get($config-global, "spacing", "horizontal")};
 		}
 		}
 	}
 	}
-}
+}

+ 9 - 0
varia/sass/blocks/paragraph/_editor.scss

@@ -0,0 +1,9 @@
+p {
+	&.has-background {
+		padding: #{map-deep-get($config-global, "spacing", "unit")} #{map-deep-get($config-global, "spacing", "unit")};
+
+		&:not(.has-background-background-color) a {
+			color: currentColor;
+		}
+	}
+}

+ 4 - 0
varia/sass/blocks/paragraph/_style.scss

@@ -2,5 +2,9 @@ p {
 	// inherits general font style set at <body>
 	// inherits general font style set at <body>
 	&.has-background {
 	&.has-background {
 		padding: #{map-deep-get($config-global, "spacing", "unit")} #{map-deep-get($config-global, "spacing", "unit")};
 		padding: #{map-deep-get($config-global, "spacing", "unit")} #{map-deep-get($config-global, "spacing", "unit")};
+
+		&:not(.has-background-background-color) a {
+			color: currentColor;
+		}
 	}
 	}
 }
 }

+ 4 - 0
varia/style-rtl.css

@@ -1563,6 +1563,10 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	padding: calc( 3 * 16px) 0;
 	margin-right: 0;
 	margin-right: 0;

+ 4 - 0
varia/style.css

@@ -1563,6 +1563,10 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	padding: calc( 3 * 16px) 0;
 	margin-left: 0;
 	margin-left: 0;