Bladeren bron

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 jaren geleden
bovenliggende
commit
8630adc945
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  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;
 	margin: 0;
 }
 }
 
 
-.image-no-margin > * {
+.image-no-margin * {
 	vertical-align: bottom;
 	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
 //Apply to Image block when we don't want margin bottom before caption
 .image-no-margin {
 .image-no-margin {
 	margin: 0;
 	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;
 		vertical-align: bottom;
 	}
 	}
 }
 }