瀏覽代碼

Blockbase: add mask-image to svg elements & set bg color to currentColor

Sarah Norris 4 年之前
父節點
當前提交
3359f3e720
共有 2 個文件被更改,包括 25 次插入7 次删除
  1. 12 3
      blockbase/assets/ponyfill.css
  2. 13 4
      blockbase/sass/post/_meta.scss

+ 12 - 3
blockbase/assets/ponyfill.css

@@ -663,18 +663,27 @@ p.has-drop-cap:not(:focus):first-letter {
 	margin-right: calc(0.5 * var(--wp--custom--margin--baseline));
 	margin-right: calc(0.5 * var(--wp--custom--margin--baseline));
 	height: 16px;
 	height: 16px;
 	width: 16px;
 	width: 16px;
+	background-color: currentColor;
 }
 }
 
 
 .post-meta .wp-block-post-author:before {
 .post-meta .wp-block-post-author:before {
-	background: url(svg/post-author.svg) no-repeat;
+	-webkit-mask-image: url(svg/post-author.svg);
+	mask-image: url(svg/post-author.svg);
 }
 }
 
 
 .post-meta .wp-block-post-date:before {
 .post-meta .wp-block-post-date:before {
-	background: url(svg/post-date.svg) no-repeat;
+	-webkit-mask-image: url(svg/post-date.svg);
+	mask-image: url(svg/post-date.svg);
 }
 }
 
 
 .post-meta .wp-block-post-hierarchical-terms:before {
 .post-meta .wp-block-post-hierarchical-terms:before {
-	background: url(svg/post-category.svg) no-repeat;
+	-webkit-mask-image: url(svg/post-category.svg);
+	mask-image: url(svg/post-category.svg);
+}
+
+.post-meta .wp-block-post-tags:before {
+	-webkit-mask-image: url(svg/post-tag.svg);
+	mask-image: url(svg/post-tag.svg);
 }
 }
 
 
 /*# sourceMappingURL=ponyfill.css.map */
 /*# sourceMappingURL=ponyfill.css.map */

+ 13 - 4
blockbase/sass/post/_meta.scss

@@ -20,17 +20,26 @@
 		margin-right: calc(0.5 * var(--wp--custom--margin--baseline) );
 		margin-right: calc(0.5 * var(--wp--custom--margin--baseline) );
 		height: 16px;
 		height: 16px;
 		width: 16px;
 		width: 16px;
+		background-color: currentColor;
 	}
 	}
 
 
 	.wp-block-post-author:before {
 	.wp-block-post-author:before {
-		background: url(svg/post-author.svg) no-repeat;
+		-webkit-mask-image: url(svg/post-author.svg);
+		mask-image: url(svg/post-author.svg);
 	}
 	}
 
 
 	.wp-block-post-date:before {
 	.wp-block-post-date:before {
-		background: url(svg/post-date.svg) no-repeat;
+		-webkit-mask-image: url(svg/post-date.svg);
+		mask-image: url(svg/post-date.svg);
 	}
 	}
 
 
-	.wp-block-post-hierarchical-terms:before {
-		background: url(svg/post-category.svg) no-repeat;
+	.wp-block-post-hierarchical-terms:before  {
+		-webkit-mask-image: url(svg/post-category.svg);
+		mask-image: url(svg/post-category.svg);
+	}
+
+	.wp-block-post-tags:before {
+		-webkit-mask-image: url(svg/post-tag.svg);
+		mask-image: url(svg/post-tag.svg);
 	}
 	}
 }
 }