Переглянути джерело

Apostrophe 2: Fix nested alignwide/full items

Kjell Reigstad 5 роки тому
батько
коміт
68d00d816d
1 змінених файлів з 20 додано та 3 видалено
  1. 20 3
      apostrophe-2/css/blocks.css

+ 20 - 3
apostrophe-2/css/blocks.css

@@ -62,7 +62,8 @@ body {
 	overflow-x: hidden;
 }
 
-.apostrophe-2-no-sidebar .alignfull {
+.apostrophe-2-no-sidebar .alignfull,
+.apostrophe-2-no-sidebar .wp-block-group .alignfull {
 	width: 100vw;
 	max-width: 100vw;
 	margin-left: 0;
@@ -72,7 +73,8 @@ body {
 	transform: translateX( -50% );
 }
 
-.rtl.apostrophe-2-no-sidebar .alignfull {
+.rtl.apostrophe-2-no-sidebar .alignfull,
+.rtl.apostrophe-2-no-sidebar .wp-block-group .alignfull {
 	left: auto;
 	right: 50%;
 	transform: translateX(50%);
@@ -112,7 +114,8 @@ body {
 /* Wide Width */
 
 @media (min-width: 1024px) {
-	.apostrophe-2-no-sidebar .alignwide {
+	.apostrophe-2-no-sidebar .alignwide,
+	.apostrophe-2-no-sidebar .wp-block-group .alignwide {
 		width: 860px;
 		max-width: 860px;
 		margin-left: -65px;
@@ -136,6 +139,20 @@ body {
 	}
 }
 
+/* Nested Blocks */
+
+.apostrophe-2-no-sidebar *[class^="wp-block"] .alignwide,
+.apostrophe-2-no-sidebar *[class^="wp-block"] .alignfull,
+.rtl.apostrophe-2-no-sidebar *[class^="wp-block"] .alignwide,
+.rtl.apostrophe-2-no-sidebar *[class^="wp-block"] .alignfull {
+	width: inherit;
+	max-width: 100%;
+	margin-left: inherit;
+	margin-right: inherit;
+	left: inherit;
+	transform: inherit;
+}
+
 /* Gallery */
 
 .wp-block-gallery {