Browse Source

Improve top margin CSS rules.

Kjell Reigstad 4 years ago
parent
commit
6044d18e5d
1 changed files with 9 additions and 11 deletions
  1. 9 11
      blank-canvas/style.css

+ 9 - 11
blank-canvas/style.css

@@ -30,14 +30,6 @@ GNU General Public License for more details.
 
 @import "variables.css";
 
-/* Remove outside padding on single post pages. */
-
-.single .site-main,
-.page .site-main {
-	padding-top: 0;
-	padding-bottom: 0;
-}
-
 /* Remove extra margin from articles on single post pages. */
 
 .single .site-main > article,
@@ -47,9 +39,15 @@ GNU General Public License for more details.
 
 /* Add some top padding if the first block on the page is not full-width or a spacer. */
 
-.single .entry-content > *:first-child:not(.alignfull):not(.wp-block-spacer),
-.page .entry-content > *:first-child:not(.alignfull):not(.wp-block-spacer) {
-	padding-top: var(--global--spacing-vertical);
+.single .entry-content > .wp-block-image.alignfull:first-child,
+.page .entry-content > .wp-block-image.alignfull:first-child,
+.single .entry-content > .wp-block-cover.alignfull:first-child,
+.page .entry-content > .wp-block-cover.alignfull:first-child,
+.single .entry-content > .wp-block-media-text.alignfull:first-child,
+.page .entry-content > .wp-block-media-text.alignfull:first-child
+.single .entry-content > .wp-block-group.has-background.alignfull:first-child,
+.page .entry-content > .wp-block-group.has-background.alignfull:first-child {
+	margin-top: calc(-1 * var(--global--spacing-vertical));
 }
 
 /* Add some top padding for archive pages. */