瀏覽代碼

Merge pull request #1301 from Automattic/fix/issue-1275-two

Varia: Make sure links are visible when parent elements have a background color.
Allan Cole 5 年之前
父節點
當前提交
44b3121ff0

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

@@ -2,9 +2,5 @@ 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;
-		}
 	}
 	}
 }
 }

+ 7 - 1
varia/sass/blocks/utilities/_editor.scss

@@ -49,7 +49,8 @@
 
 
 // Gutenberg background-color options
 // Gutenberg background-color options
 .has-background {
 .has-background {
-	p, a, h1, h2, h3, h4, h5, h6,
+	&:not(.has-background-background-color) a,
+	p, h1, h2, h3, h4, h5, h6,
 	.wp-block-quote__citation {
 	.wp-block-quote__citation {
 		color: currentColor;
 		color: currentColor;
 	}
 	}
@@ -60,6 +61,11 @@
 	color: #{map-deep-get($config-global, "color", "background", "default")};
 	color: #{map-deep-get($config-global, "color", "background", "default")};
 }
 }
 
 
+.has-primary-background-color[class] {
+	background-color: #{map-deep-get($config-global, "color", "primary", "default")} !important;
+	color: #{map-deep-get($config-global, "color", "background", "default")};
+}
+
 .has-secondary-background-color[class] {
 .has-secondary-background-color[class] {
 	background-color: #{map-deep-get($config-global, "color", "secondary", "default")} !important;
 	background-color: #{map-deep-get($config-global, "color", "secondary", "default")} !important;
 	color: #{map-deep-get($config-global, "color", "background", "default")};
 	color: #{map-deep-get($config-global, "color", "background", "default")};

+ 4 - 1
varia/sass/blocks/utilities/_style.scss

@@ -142,7 +142,10 @@
 
 
 // Gutenberg background-color options
 // Gutenberg background-color options
 .has-background {
 .has-background {
-	p, a, h1, h2, h3, h4, h5, h6 {
+
+	&:not(.has-background-background-color) a,
+	p, h1, h2, h3, h4, h5, h6,
+	.wp-block-quote__citation {
 		color: currentColor;
 		color: currentColor;
 	}
 	}
 }
 }

+ 1 - 1
varia/sass/vendors/_jetpack.scss

@@ -33,4 +33,4 @@
 	&:last-child {
 	&:last-child {
 		margin-bottom: 0;
 		margin-bottom: 0;
 	}
 	}
-}
+}

+ 7 - 1
varia/style-editor.css

@@ -633,7 +633,8 @@ table th,
 	color: white !important;
 	color: white !important;
 }
 }
 
 
-.has-background p, .has-background a, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6,
+.has-background:not(.has-background-background-color) a,
+.has-background p, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6,
 .has-background .wp-block-quote__citation {
 .has-background .wp-block-quote__citation {
 	color: currentColor;
 	color: currentColor;
 }
 }
@@ -643,6 +644,11 @@ table th,
 	color: white;
 	color: white;
 }
 }
 
 
+.has-primary-background-color[class] {
+	background-color: blue !important;
+	color: white;
+}
+
 .has-secondary-background-color[class] {
 .has-secondary-background-color[class] {
 	background-color: red !important;
 	background-color: red !important;
 	color: white;
 	color: white;

+ 3 - 18
varia/style-rtl.css

@@ -1635,10 +1635,6 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
-p.has-background:not(.has-background-background-color) a {
-	color: currentColor;
-}
-
 .a8c-posts-list__listing {
 .a8c-posts-list__listing {
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
@@ -2039,7 +2035,9 @@ table th,
 	color: white !important;
 	color: white !important;
 }
 }
 
 
-.has-background p, .has-background a, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6 {
+.has-background:not(.has-background-background-color) a,
+.has-background p, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6,
+.has-background .wp-block-quote__citation {
 	color: currentColor;
 	color: currentColor;
 }
 }
 
 
@@ -2344,11 +2342,6 @@ table th,
 	z-index: 1;
 	z-index: 1;
 }
 }
 
 
-.main-navigation > div > ul li:hover, .main-navigation > div > ul li[focus-within] {
-	cursor: pointer;
-	z-index: 99999;
-}
-
 .main-navigation > div > ul li:hover, .main-navigation > div > ul li:focus-within {
 .main-navigation > div > ul li:hover, .main-navigation > div > ul li:focus-within {
 	cursor: pointer;
 	cursor: pointer;
 	z-index: 99999;
 	z-index: 99999;
@@ -2361,14 +2354,6 @@ table th,
 		/* Submenu display */
 		/* Submenu display */
 	}
 	}
 	.main-navigation > div > ul li:hover > ul,
 	.main-navigation > div > ul li:hover > ul,
-	.main-navigation > div > ul li[focus-within] > ul,
-	.main-navigation > div > ul li ul:hover,
-	.main-navigation > div > ul li ul:focus {
-		visibility: visible;
-		opacity: 1;
-		display: block;
-	}
-	.main-navigation > div > ul li:hover > ul,
 	.main-navigation > div > ul li:focus-within > ul,
 	.main-navigation > div > ul li:focus-within > ul,
 	.main-navigation > div > ul li ul:hover,
 	.main-navigation > div > ul li ul:hover,
 	.main-navigation > div > ul li ul:focus {
 	.main-navigation > div > ul li ul:focus {

+ 3 - 5
varia/style.css

@@ -1635,10 +1635,6 @@ p.has-background {
 	padding: 16px 16px;
 	padding: 16px 16px;
 }
 }
 
 
-p.has-background:not(.has-background-background-color) a {
-	color: currentColor;
-}
-
 .a8c-posts-list__listing {
 .a8c-posts-list__listing {
 	list-style: none;
 	list-style: none;
 	margin: 0;
 	margin: 0;
@@ -2044,7 +2040,9 @@ table th,
 	color: white !important;
 	color: white !important;
 }
 }
 
 
-.has-background p, .has-background a, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6 {
+.has-background:not(.has-background-background-color) a,
+.has-background p, .has-background h1, .has-background h2, .has-background h3, .has-background h4, .has-background h5, .has-background h6,
+.has-background .wp-block-quote__citation {
 	color: currentColor;
 	color: currentColor;
 }
 }