From 12574dd319426a3bd1823b4a82d1e8cf8da88d4f Mon Sep 17 00:00:00 2001 From: Sal Ferrarello Date: Tue, 29 May 2018 16:04:01 -0400 Subject: [PATCH] Add support for new editor CSS image classes See #182 --- css/sass/supporting/wordpress-image.scss | 22 ++++++++++++++++++++++ lib/block-editor-support.php | 6 ++++++ 2 files changed, 28 insertions(+) create mode 100644 lib/block-editor-support.php diff --git a/css/sass/supporting/wordpress-image.scss b/css/sass/supporting/wordpress-image.scss index 6ecec78..a32c00f 100755 --- a/css/sass/supporting/wordpress-image.scss +++ b/css/sass/supporting/wordpress-image.scss @@ -44,6 +44,28 @@ img.alignnone { margin: 5px 0; } + + .alignwide, + .alignfull { + margin-left: calc(25% - 25vw); + margin-right: calc(25% - 25vw); + width: auto; + max-width: 1000%; + } + + /** + * Only apply alignfull on full width content page template. + */ + .full-width-content .alignfull { + margin-left: calc(50% - 50vw); + margin-right: calc(50% - 50vw); + } + + .alignwide img, + .alignfull img { + display: block; + margin: 0 auto; + } } .wp-caption .wp-caption-text, diff --git a/lib/block-editor-support.php b/lib/block-editor-support.php new file mode 100644 index 0000000..1942510 --- /dev/null +++ b/lib/block-editor-support.php @@ -0,0 +1,6 @@ +