Skip to content

Commit

Permalink
Blocks: Add the missing alignments classNames to the Cover Image Bloc…
Browse files Browse the repository at this point in the history
…k's markup
  • Loading branch information
youknowriad committed Dec 20, 2017
1 parent 64ac510 commit ed74c1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions blocks/library/cover-image/index.js
Expand Up @@ -166,7 +166,7 @@ registerBlockType( 'core/cover-image', {
},

save( { attributes, className } ) {
const { url, title, hasParallax, dimRatio } = attributes;
const { url, title, hasParallax, dimRatio, align } = attributes;
const style = url ?
{ backgroundImage: `url(${ url })` } :
undefined;
Expand All @@ -176,7 +176,8 @@ registerBlockType( 'core/cover-image', {
{
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
}
},
align ? `align${ align }` : null,
);

return (
Expand Down
2 changes: 1 addition & 1 deletion post-content.js
Expand Up @@ -8,7 +8,7 @@ window._wpGutenbergPost.title = {
window._wpGutenbergPost.content = {
raw: [
'<!-- wp:cover-image {"url":"https://cldup.com/Fz-ASbo2s3.jpg","align":"wide"} -->',
'<section class="wp-block-cover-image has-background-dim" style="background-image:url(https://cldup.com/Fz-ASbo2s3.jpg)"><h2>Of Mountains &amp; Printing Presses</h2></section>',
'<section class="wp-block-cover-image has-background-dim alignwide" style="background-image:url(https://cldup.com/Fz-ASbo2s3.jpg)"><h2>Of Mountains &amp; Printing Presses</h2></section>',
'<!-- /wp:cover-image -->',

'<!-- wp:paragraph -->',
Expand Down

0 comments on commit ed74c1e

Please sign in to comment.