Browse Source

Blockbase: remove margin-top from first descendants of columns and groups (#4436)

* Refactor text styles and add padding to groups w border.

* move group and column margin resets to blockbase

* rebuild

Co-authored-by: Ben Dwyer <ben@scruffian.com>
Jeff Ong 3 years ago
parent
commit
45bb8e35e0

+ 4 - 0
blockbase/assets/ponyfill.css

@@ -159,6 +159,10 @@ p {
 	margin-bottom: var(--wp--custom--margin--vertical);
 }
 
+.wp-block-column :first-child, .wp-block-group :first-child {
+	margin-top: 0;
+}
+
 .image-no-margin {
 	margin: 0;
 }

+ 7 - 1
blockbase/sass/base/_text.scss

@@ -10,4 +10,10 @@
 p {
 	margin-top: var(--wp--custom--margin--vertical);
 	margin-bottom: var(--wp--custom--margin--vertical);
-}
+}
+
+.wp-block-column, .wp-block-group {
+	:first-child {
+		margin-top: 0;
+	}
+}

+ 8 - 0
skatepark/assets/theme.css

@@ -43,11 +43,19 @@
 	color: var(--wp--preset--color--background);
 }
 
+<<<<<<< HEAD
+<<<<<<< HEAD
 p {
 	margin-top: calc( 0.5 * var(--wp--custom--margin--vertical));
 	margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical));
+=======
+.wp-block-column > p:first-child, .wp-block-column > h1:first-child, .wp-block-column > h2:first-child, .wp-block-column > h3:first-child, .wp-block-column > h4:first-child, .wp-block-column > h5:first-child, .wp-block-column > h6:first-child, .wp-block-group > p:first-child, .wp-block-group > h1:first-child, .wp-block-group > h2:first-child, .wp-block-group > h3:first-child, .wp-block-group > h4:first-child, .wp-block-group > h5:first-child, .wp-block-group > h6:first-child {
+	margin-top: 0;
+>>>>>>> Refactor text styles and add padding to groups w border.
 }
 
+=======
+>>>>>>> move group and column margin resets to blockbase
 .wp-block-post-author__content {
 	display: flex;
 	flex-direction: column;

+ 0 - 5
skatepark/sass/base/_text.scss

@@ -2,8 +2,3 @@
 ::selection {
 	color: var(--wp--preset--color--background);
 }
-
-p {
-	margin-top: calc( 0.5 * var(--wp--custom--margin--vertical) );
-	margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical) );
-}