Skip to content

Post Title Block: Custom margin applied to Headings does is not reflected in the front-end #35522

@kjellr

Description

@kjellr

If a custom margin values are manually added to the Post Title block via block markup, they're reflected in the editor, but are not present in the front-end.

Sample markup

<!-- wp:post-title {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}} /-->

Or, here's a block pattern that uses this markup:

<!-- wp:post-template -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"verticalAlignment":"top","width":"160px"} -->
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:160px"><!-- wp:post-date {"fontSize":"small"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center","width":"75%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:75%"><!-- wp:post-title {"isLink":true,"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}},"typography":{"fontSize":"clamp(3rem, 6vw, 4rem)"}}} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->
<!-- /wp:post-template -->

Screenshots

Editor Front-end
Screen Shot 2021-10-11 at 1 58 54 PM Screen Shot 2021-10-11 at 1 59 08 PM
Editor Front-end
Screen Shot 2021-10-11 at 1 57 27 PM Screen Shot 2021-10-11 at 1 57 47 PM

Metadata

Metadata

Assignees

Labels

[Block] Post TitleAffects the Post Title Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions