Ver código fonte

Varia: Update Cover Block default background-color and text color

- Update config file to include background and foreground color
Allan Cole 5 anos atrás
pai
commit
108fe0410b

+ 4 - 0
varia/sass/blocks/cover/_config.scss

@@ -3,5 +3,9 @@
  */
 $config-cover: (
 	"height": calc( 15 * #{map-deep-get($config-global, "spacing", "vertical")} ),
+	"color": (
+		"foreground": #{map-deep-get($config-global, "color", "white")},
+		"background": #{map-deep-get($config-global, "color", "black")},
+	)
 );
 

+ 2 - 2
varia/sass/blocks/cover/_style.scss

@@ -1,14 +1,14 @@
 .wp-block-cover,
 .wp-block-cover-image {
 
-	background-color: #{map-deep-get($config-global, "color", "foreground", "default")};
+	background-color: #{map-deep-get($config-cover, "color", "background")};
 	min-height: #{map-deep-get($config-cover, "height")};
 	margin: inherit;
 
 	.wp-block-cover__inner-container,
 	.wp-block-cover-image-text,
 	.wp-block-cover-text {
-		color: #{map-deep-get($config-global, "color", "background", "default")};
+		color: #{map-deep-get($config-cover, "color", "foreground")};
 		margin-top: #{map-deep-get($config-global, "spacing", "vertical")};
 		margin-bottom: #{map-deep-get($config-global, "spacing", "vertical")};
 

+ 1 - 1
varia/style-rtl.css

@@ -1171,7 +1171,7 @@ input.has-focus[type="submit"],
 
 .wp-block-cover,
 .wp-block-cover-image {
-	background-color: #444444;
+	background-color: black;
 	min-height: calc( 15 * 32px);
 	margin: inherit;
 	/* Treating H2 separately to account for legacy /core styles */

+ 1 - 1
varia/style.css

@@ -1171,7 +1171,7 @@ input.has-focus[type="submit"],
 
 .wp-block-cover,
 .wp-block-cover-image {
-	background-color: #444444;
+	background-color: black;
 	min-height: calc( 15 * 32px);
 	margin: inherit;
 	/* Treating H2 separately to account for legacy /core styles */