浏览代码

Blockbase: Fix gap on image-no-margin utility class when image has a hyperlink (#4209)

* Blockbase: Apply image-no-margin alignment to all children

* Blockbase: Update image-no-margin comment
Sarah Norris 4 年之前
父节点
当前提交
8630adc945
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      blockbase/assets/ponyfill.css
  2. 1 1
      blockbase/sass/base/_utility.scss

+ 1 - 1
blockbase/assets/ponyfill.css

@@ -116,7 +116,7 @@ p, h1, h2, h3, h4, h5, h6 {
 	margin: 0;
 }
 
-.image-no-margin > * {
+.image-no-margin * {
 	vertical-align: bottom;
 }
 

+ 1 - 1
blockbase/sass/base/_utility.scss

@@ -3,7 +3,7 @@
 //Apply to Image block when we don't want margin bottom before caption
 .image-no-margin {
 	margin: 0;
-	& > * { //the first sibling is a div on the editor and an image on the frontend
+	& * { //Removes any whitespace created by child elements (a div on the editor, and an image or link on the frontend)
 		vertical-align: bottom;
 	}
 }