浏览代码

Code tidying

Allan Cole 6 年之前
父节点
当前提交
5a937f822a
共有 3 个文件被更改,包括 25 次插入10 次删除
  1. 9 2
      elegant-business/sass/blocks/_blocks.scss
  2. 8 4
      elegant-business/style-rtl.css
  3. 8 4
      elegant-business/style.css

+ 9 - 2
elegant-business/sass/blocks/_blocks.scss

@@ -11,11 +11,11 @@
 		margin: $size__vertical-spacing-unit auto;
 	}
 
-	> *:first-child {
+	&:first-child {
 		margin-top: 0;
 	}
 
-	> *:last-child {
+	&:last-child {
 		margin-bottom: 0;
 	}
 
@@ -87,6 +87,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

+ 8 - 4
elegant-business/style-rtl.css

@@ -3340,13 +3340,13 @@ body.page .main-navigation {
   }
 }
 
-.entry .entry-content > * > *:first-child,
-.entry .entry-summary > * > *:first-child {
+.entry .entry-content > *:first-child,
+.entry .entry-summary > *:first-child {
   margin-top: 0;
 }
 
-.entry .entry-content > * > *:last-child,
-.entry .entry-summary > * > *:last-child {
+.entry .entry-content > *:last-child,
+.entry .entry-summary > *:last-child {
   margin-bottom: 0;
 }
 
@@ -3440,6 +3440,10 @@ body.page .main-navigation {
   }
 }
 
+.entry:not(.has-post-thumbnail) .entry-content > :first-child {
+  margin-top: 0;
+}
+
 /*
  * Unset nested content selector styles
  * - Prevents layout styles from cascading too deeply

+ 8 - 4
elegant-business/style.css

@@ -3346,13 +3346,13 @@ body.page .main-navigation {
   }
 }
 
-.entry .entry-content > * > *:first-child,
-.entry .entry-summary > * > *:first-child {
+.entry .entry-content > *:first-child,
+.entry .entry-summary > *:first-child {
   margin-top: 0;
 }
 
-.entry .entry-content > * > *:last-child,
-.entry .entry-summary > * > *:last-child {
+.entry .entry-content > *:last-child,
+.entry .entry-summary > *:last-child {
   margin-bottom: 0;
 }
 
@@ -3452,6 +3452,10 @@ body.page .main-navigation {
   }
 }
 
+.entry:not(.has-post-thumbnail) .entry-content > :first-child {
+  margin-top: 0;
+}
+
 /*
  * Unset nested content selector styles
  * - Prevents layout styles from cascading too deeply