浏览代码

Merge pull request #1009 from Automattic/fix/top-margins-for-first-block

Calm Business: Make sure the first block has margin-top: 0
Jeffrey Pearce 6 年之前
父节点
当前提交
1b9a85df99

+ 7 - 0
calm-business/sass/blocks/_blocks.scss

@@ -92,6 +92,13 @@
 	}
 }
 
+/*
+ * Make sure the first block has margin-top: 0
+ */
+.entry:not(.has-post-thumbnail) .entry-content > :first-child {
+	margin-top: 0;
+}
+
 /*
  * Unset nested content selector styles
  * - Prevents layout styles from cascading too deeply

+ 5 - 5
calm-business/sass/site/primary/_posts-and-pages.scss

@@ -32,11 +32,11 @@
 
 	.entry-header {
 
-		margin: calc(3 * #{ $size__spacing-unit}) $size__spacing-unit $size__spacing-unit;
+		margin: calc(3 * #{ $size__spacing-unit}) $size__spacing-unit $size__vertical-spacing-unit;
 		position: relative;
 
 		@include media(tablet) {
-			margin: calc(3 * 1rem) auto calc(1rem / 2);
+			margin: calc(3 * 1rem) auto $size__vertical-spacing-unit;
     		max-width: $size__site-tablet-content;
 		}
 
@@ -47,8 +47,10 @@
 
 	.entry-title {
 		font-size: $font__size-lg;
+		margin: 0;
+
 		@include media(tablet) {
-			margin: 32px auto;
+			margin: $size__vertical-spacing-unit auto;
 			max-width: $size__site-tablet-content;
 		}
 
@@ -56,8 +58,6 @@
 			max-width: $size__site-desktop-content;
 		}
 
-		margin: 0;
-
 		a {
 			color: inherit;
 

+ 10 - 4
calm-business/style-rtl.css

@@ -986,7 +986,6 @@ form p {
 .contact-form input[type="datetime-local"],
 .contact-form input[type="color"] {
   margin-bottom: 13.6px;
-  min-width: 300px;
   min-height: 56px;
 }
 
@@ -2381,13 +2380,13 @@ body.page .main-navigation {
 }
 
 .entry .entry-header {
-  margin: calc(3 * 1rem) 1rem 1rem;
+  margin: calc(3 * 1rem) 1rem 32px;
   position: relative;
 }
 
 @media only screen and (min-width: 768px) {
   .entry .entry-header {
-    margin: calc(3 * 1rem) auto calc(1rem / 2);
+    margin: calc(3 * 1rem) auto 32px;
     max-width: calc(8 * (100vw / 12) - 28px);
   }
 }
@@ -3601,6 +3600,13 @@ body.page .main-navigation {
   }
 }
 
+/*
+ * Make sure the first block has margin-top: 0
+ */
+.entry:not(.has-post-thumbnail) .entry-content > :first-child {
+  margin-top: 0;
+}
+
 /*
  * Unset nested content selector styles
  * - Prevents layout styles from cascading too deeply
@@ -4485,7 +4491,7 @@ body.page .main-navigation {
 
 @media only screen and (min-width: 768px) {
   .entry .entry-content .wp-block-media-text.alignfull .wp-block-media-text__content {
-    padding: 0 8%;
+    padding: 32px 8%;
   }
 }
 

+ 9 - 2
calm-business/style.css

@@ -2386,13 +2386,13 @@ body.page .main-navigation {
 }
 
 .entry .entry-header {
-  margin: calc(3 * 1rem) 1rem 1rem;
+  margin: calc(3 * 1rem) 1rem 32px;
   position: relative;
 }
 
 @media only screen and (min-width: 768px) {
   .entry .entry-header {
-    margin: calc(3 * 1rem) auto calc(1rem / 2);
+    margin: calc(3 * 1rem) auto 32px;
     max-width: calc(8 * (100vw / 12) - 28px);
   }
 }
@@ -3612,6 +3612,13 @@ body.page .main-navigation {
   }
 }
 
+/*
+ * Make sure the first block has margin-top: 0
+ */
+.entry:not(.has-post-thumbnail) .entry-content > :first-child {
+  margin-top: 0;
+}
+
 /*
  * Unset nested content selector styles
  * - Prevents layout styles from cascading too deeply