Skip to content

Commit

Permalink
Imp: gutenberg coverimage alignwide alignfull prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
eri-trabiccolo committed Oct 19, 2018
1 parent d489bd6 commit 402fbc7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions assets/front/css/_parts/0_5_single_post_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,38 @@ a + span.hu-external:after {
font-variant: normal;
text-rendering: auto;
line-height: 1;
}

/* Gutenberg
/* ------------------------------------ */
/* cover images */
/*
* Real alignfull and alignwide
* allowed only in layouts with no sidebars and full-width
*/
.full-width.col-1c #wrapper {
overflow-x: hidden;
}
.content .post,
.content .page {
overflow: visible;
}
/* alignfull */
.full-width.col-1c .wp-block-cover-image.alignfull {
width: 100vw;
max-width: 100vw;
position: relative;
left: 50%;
transform: translateX(-50%);
margin-left: 0;
margin-right: 0;
}
/* alignwide and alignfull in boxed layouts */
/* only reset the .pad container horizontal padding*/
.entry-inner > .wp-block-cover-image.alignfull,
.entry-inner > .wp-block-cover-image.alignwide {
margin-right: -30px;
margin-left: -30px;
clear: both;
width: auto;
}
3 changes: 3 additions & 0 deletions functions/init-after-setup-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ function hu_setup() {
add_theme_support( 'customize-selective-refresh-widgets' );
}

// Add support for Gutenberg cover image sizes
add_theme_support( 'align-wide' );

// Thumbnail sizes
add_image_size( 'thumb-small', 160, 160, true );
add_image_size( 'thumb-standard', 320, 320, true );
Expand Down

0 comments on commit 402fbc7

Please sign in to comment.