瀏覽代碼

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;
 	overflow-x: hidden;
 }
 }
 
 
-.apostrophe-2-no-sidebar .alignfull {
+.apostrophe-2-no-sidebar .alignfull,
+.apostrophe-2-no-sidebar .wp-block-group .alignfull {
 	width: 100vw;
 	width: 100vw;
 	max-width: 100vw;
 	max-width: 100vw;
 	margin-left: 0;
 	margin-left: 0;
@@ -72,7 +73,8 @@ body {
 	transform: translateX( -50% );
 	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;
 	left: auto;
 	right: 50%;
 	right: 50%;
 	transform: translateX(50%);
 	transform: translateX(50%);
@@ -112,7 +114,8 @@ body {
 /* Wide Width */
 /* Wide Width */
 
 
 @media (min-width: 1024px) {
 @media (min-width: 1024px) {
-	.apostrophe-2-no-sidebar .alignwide {
+	.apostrophe-2-no-sidebar .alignwide,
+	.apostrophe-2-no-sidebar .wp-block-group .alignwide {
 		width: 860px;
 		width: 860px;
 		max-width: 860px;
 		max-width: 860px;
 		margin-left: -65px;
 		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 */
 /* Gallery */
 
 
 .wp-block-gallery {
 .wp-block-gallery {