Prechádzať zdrojové kódy

Friendly Business: Fix the double margin on Media & Text block contents

Danny Dudzic 6 rokov pred
rodič
commit
aaf052e4e9

+ 5 - 5
friendly-business/sass/blocks/_blocks.scss

@@ -783,7 +783,7 @@
 				color: inherit;
 			}
 
-			& :last-child {
+			> :last-child {
 				margin-bottom: 1.5em;
 			}
 
@@ -798,11 +798,11 @@
 		}
 
 		&.has-media-on-the-right .wp-block-media-text__content {
-			:first-child {
+			> :first-child {
 				margin-top: $size__vertical-spacing-unit;
 			}
 
-			:last-child {
+			> :last-child {
 				margin-bottom: $size__vertical-spacing-unit;
 			}
 		}
@@ -836,7 +836,7 @@
 		@include media(tablet) {
 
 			.wp-block-media-text__content {
-				:last-child {
+				> :last-child {
 					margin-bottom: $size__vertical-spacing-unit;
 				}
 			}
@@ -845,7 +845,7 @@
 
 				.wp-block-media-text__content {
 
-					:first-child {
+					> :first-child {
 						margin-top: $size__vertical-spacing-unit;
 					}
 				}

+ 5 - 5
friendly-business/style-rtl.css

@@ -4210,7 +4210,7 @@ body.page .main-navigation {
   color: inherit;
 }
 
-.entry .entry-content .wp-block-media-text .wp-block-media-text__content :last-child {
+.entry .entry-content .wp-block-media-text .wp-block-media-text__content > :last-child {
   margin-bottom: 1.5em;
 }
 
@@ -4223,11 +4223,11 @@ body.page .main-navigation {
   text-align: right;
 }
 
-.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :first-child {
+.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :first-child {
   margin-top: 32px;
 }
 
-.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :last-child {
+.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :last-child {
   margin-bottom: 32px;
 }
 
@@ -4253,10 +4253,10 @@ body.page .main-navigation {
 }
 
 @media only screen and (min-width: 768px) {
-  .entry .entry-content .wp-block-media-text .wp-block-media-text__content :last-child {
+  .entry .entry-content .wp-block-media-text .wp-block-media-text__content > :last-child {
     margin-bottom: 32px;
   }
-  .entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :first-child {
+  .entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :first-child {
     margin-top: 32px;
   }
 }

+ 5 - 5
friendly-business/style.css

@@ -4222,7 +4222,7 @@ body.page .main-navigation {
   color: inherit;
 }
 
-.entry .entry-content .wp-block-media-text .wp-block-media-text__content :last-child {
+.entry .entry-content .wp-block-media-text .wp-block-media-text__content > :last-child {
   margin-bottom: 1.5em;
 }
 
@@ -4235,11 +4235,11 @@ body.page .main-navigation {
   text-align: left;
 }
 
-.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :first-child {
+.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :first-child {
   margin-top: 32px;
 }
 
-.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :last-child {
+.entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :last-child {
   margin-bottom: 32px;
 }
 
@@ -4265,10 +4265,10 @@ body.page .main-navigation {
 }
 
 @media only screen and (min-width: 768px) {
-  .entry .entry-content .wp-block-media-text .wp-block-media-text__content :last-child {
+  .entry .entry-content .wp-block-media-text .wp-block-media-text__content > :last-child {
     margin-bottom: 32px;
   }
-  .entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content :first-child {
+  .entry .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content > :first-child {
     margin-top: 32px;
   }
 }