Sfoglia il codice sorgente

Varia: Have links inherit the color only when the block (Media & Text or Paragrpah) are using a background color

+ rebuild Redhill

See #1113
Thomas Guillot 6 anni fa
parent
commit
1c88107692

+ 9 - 1
redhill/style-editor.css

@@ -444,7 +444,15 @@ object {
 	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;
 }
 

+ 5 - 0
redhill/style-rtl.css

@@ -1763,6 +1763,11 @@ hr.is-style-dots:before {
 	padding-right: 0.83333rem;
 }
 
+.wp-block-jetpack-slideshow ul {
+	margin-right: 0;
+	margin-left: 0;
+}
+
 .wp-block-spacer {
 	display: block;
 	margin-bottom: 0;

+ 5 - 1
redhill/style.css

@@ -1584,7 +1584,7 @@ dd {
 	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;
 }
 
@@ -1603,6 +1603,10 @@ p.has-background {
 	padding: 16px 16px;
 }
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	margin-left: 0;

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

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

+ 6 - 5
varia/sass/blocks/media-text/_editor.scss

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

+ 8 - 3
varia/sass/blocks/media-text/_style.scss

@@ -17,9 +17,14 @@
 				margin-bottom: 0;
 			}
 		}
+	}
 
-		a {
-			color: currentColor;
+	&[class*="background-color"]:not(.has-background-background-color),
+	&[style*="background-color"] {
+		.wp-block-media-text__content {
+			a {
+				color: currentColor;
+			}
 		}
 	}
 
@@ -38,4 +43,4 @@
 			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>
 	&.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;
+		}
 	}
 }

+ 9 - 1
varia/style-editor.css

@@ -390,7 +390,15 @@ object {
 	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;
 }
 

+ 10 - 1
varia/style-rtl.css

@@ -1543,7 +1543,7 @@ dd {
 	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;
 }
 
@@ -1562,6 +1562,10 @@ p.has-background {
 	padding: 16px 16px;
 }
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	margin-right: 0;
@@ -1722,6 +1726,11 @@ hr.is-style-dots:before {
 	padding-right: 0.83333rem;
 }
 
+.wp-block-jetpack-slideshow ul {
+	margin-right: 0;
+	margin-left: 0;
+}
+
 .wp-block-spacer {
 	display: block;
 	margin-bottom: 0;

+ 5 - 1
varia/style.css

@@ -1543,7 +1543,7 @@ dd {
 	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;
 }
 
@@ -1562,6 +1562,10 @@ p.has-background {
 	padding: 16px 16px;
 }
 
+p.has-background:not(.has-background-background-color) a {
+	color: currentColor;
+}
+
 .wp-block-pullquote {
 	padding: calc( 3 * 16px) 0;
 	margin-left: 0;