From 975b45cac87f0ea4de6c7933586b22aac4f2f801 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 1 Apr 2019 07:33:58 -0400 Subject: [PATCH 1/2] Add support for section block alignments on the front end. Adds support for wide/full child blocks inside of a section block. --- css/blocks.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/css/blocks.css b/css/blocks.css index 60f94d6..3827482 100644 --- a/css/blocks.css +++ b/css/blocks.css @@ -117,6 +117,20 @@ ul.wp-block-latest-posts.is-grid.alignwide { padding: 0; } +.wp-block-section > * { + max-width: 610px; + margin-left: auto; + margin-right: auto; +} + +.wp-block-section > .alignwide { + max-width: 1100px; +} + +.wp-block-section > .alignfull { + max-width: 100%; +} + @media screen and (min-width: 768px) { .wp-block-cover-text p { padding: 1.5em 0; From 340008667a7d67218724034f0ed95db115424e50 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 1 Apr 2019 07:39:59 -0400 Subject: [PATCH 2/2] Add support for true full alignment even when there's a background color. --- css/blocks.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/css/blocks.css b/css/blocks.css index 3827482..4ab2d1a 100644 --- a/css/blocks.css +++ b/css/blocks.css @@ -131,6 +131,13 @@ ul.wp-block-latest-posts.is-grid.alignwide { max-width: 100%; } +.wp-block-section.has-background > .alignfull { + width: calc( 100% + 60px ); + max-width: calc( 100% + 60px ); + position: relative; + left: -30px; +} + @media screen and (min-width: 768px) { .wp-block-cover-text p { padding: 1.5em 0;