From 0ff5d98e95a2cd67c158c28a4e12c915b44a5f19 Mon Sep 17 00:00:00 2001 From: Trevor Thompson Date: Sun, 9 Dec 2018 12:36:59 -0500 Subject: [PATCH] Added wide and full align support for center column layouts. --- lib/assets/less/style.less | 26 ++++++++++++++++++++++++++ lib/init.php | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/lib/assets/less/style.less b/lib/assets/less/style.less index a22a7d8c..7df6586c 100644 --- a/lib/assets/less/style.less +++ b/lib/assets/less/style.less @@ -16,6 +16,7 @@ .tm-main { word-wrap: break-word; + overflow-x: hidden; } @@ -233,3 +234,28 @@ article header > .tm-article-image:first-child { color: #333; outline: 1px #ccc solid; } + + +/* Gutenberg + ========================================================================== */ + +.wp-block-cover-image.alignfull, +.wp-block-gallery.alignfull, +.wp-block-image.alignfull img , +.wp-block-cover-image.alignfull, +.wp-block-gallery.alignfull, +.wp-block-image.alignfull img { + clear: both; + margin-left: ~"calc(50% - 50vw)"; + margin-right: ~"calc(50% - 50vw)"; + width: 100vw; +} + +@media only screen and (min-width: 1062px) { + + .alignwide { + margin-left: -10%; + margin-right: -10%; + } + +} diff --git a/lib/init.php b/lib/init.php index 0d0d382d..ce6a20da 100644 --- a/lib/init.php +++ b/lib/init.php @@ -123,6 +123,10 @@ function beans_add_theme_support() { ) ); + if ( in_array( beans_get_layout(), array( 'c', 'sp_c_ss' ), true ) ) { + add_theme_support( 'align-wide' ); + } + // Beans specific. add_theme_support( 'offcanvas-menu' ); add_theme_support( 'beans-default-styling' );