فهرست منبع

Varia: Add vertical margins to content in Jetpack Layout Grid block.

Allan Cole 5 سال پیش
والد
کامیت
edbe76990c
4فایلهای تغییر یافته به همراه74 افزوده شده و 2 حذف شده
  1. 27 1
      varia/sass/vendors/_jetpack.scss
  2. 1 1
      varia/style-editor.css
  3. 23 0
      varia/style-rtl.css
  4. 23 0
      varia/style.css

+ 27 - 1
varia/sass/vendors/_jetpack.scss

@@ -141,9 +141,35 @@ body {
 /**
  * Business Hours
  */
-
 .jetpack-business-hours {
 	dd {
 		padding-left: 0;
 	}
 }
+
+/**
+ * Layout Grid
+ */
+.wp-block-jetpack-layout-grid {
+
+	.wp-block-jetpack-layout-grid-column {
+
+		& > * {
+			margin-top: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
+			margin-bottom: #{ 0.666 * map-deep-get($config-global, "spacing", "vertical") };
+
+			@include media(mobile) {
+				margin-top: map-deep-get($config-global, "spacing", "vertical");
+				margin-bottom: map-deep-get($config-global, "spacing", "vertical");
+			}
+
+			&:first-child {
+				margin-top: 0;
+			}
+
+			&:last-child {
+				margin-bottom: 0;
+			}
+		}
+	}
+}

+ 1 - 1
varia/style-editor.css

@@ -1042,7 +1042,7 @@ table th,
 	display: none;
 }
 
-.template-block .fse-template-part .wp-block-column .block-editor-block-list__layout [data-type='a8c/site-title']:first-child .site-title:not([data-align='full']) {
+.template-block .fse-template-part .wp-block-column .block-editor-block-list__layout [data-type='a8c/site-title']:first-child .site-title {
 	margin-top: 0;
 }
 

+ 23 - 0
varia/style-rtl.css

@@ -3694,6 +3694,29 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	padding-right: 0;
 }
 
+/**
+ * Layout Grid
+ */
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > * {
+	margin-top: 21.312px;
+	margin-bottom: 21.312px;
+}
+
+@media only screen and (min-width: 560px) {
+	.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > * {
+		margin-top: 32px;
+		margin-bottom: 32px;
+	}
+}
+
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > *:first-child {
+	margin-top: 0;
+}
+
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > *:last-child {
+	margin-bottom: 0;
+}
+
 /**
  * Full Site Editing
  * - Full Site Editing overrides

+ 23 - 0
varia/style.css

@@ -3723,6 +3723,29 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	padding-left: 0;
 }
 
+/**
+ * Layout Grid
+ */
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > * {
+	margin-top: 21.312px;
+	margin-bottom: 21.312px;
+}
+
+@media only screen and (min-width: 560px) {
+	.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > * {
+		margin-top: 32px;
+		margin-bottom: 32px;
+	}
+}
+
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > *:first-child {
+	margin-top: 0;
+}
+
+.wp-block-jetpack-layout-grid .wp-block-jetpack-layout-grid-column > *:last-child {
+	margin-bottom: 0;
+}
+
 /**
  * Full Site Editing
  * - Full Site Editing overrides