浏览代码

Apostrophe 2 alignwide blocks fix.

Ensure alignwide child blocks do not break out of their container.
Kjell Reigstad 5 年之前
父节点
当前提交
53e398d39f
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      apostrophe-2/css/blocks.css

+ 7 - 0
apostrophe-2/css/blocks.css

@@ -115,6 +115,13 @@ body {
 		position: relative;
 	}
 
+	/* Child blocks should not get wider than their parent */
+	.apostrophe-2-no-sidebar [class^="wp-block-"] .alignwide {
+		max-width: 100%;
+		margin-left: auto;
+		margin-right: auto;
+	}
+
 	.apostrophe-2-no-sidebar .wp-block-embed.is-type-video.alignwide:before {
 		content: "";
 		display: block;