Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment & spacing is not passed to the frontend preview #416

Closed
ryelle opened this issue Feb 28, 2022 · 0 comments · Fixed by #419
Closed

Alignment & spacing is not passed to the frontend preview #416

ryelle opened this issue Feb 28, 2022 · 0 comments · Fixed by #419
Assignees
Labels
[Component] Theme The frontend of the pattern directory, pattern lists UI

Comments

@ryelle
Copy link
Contributor

ryelle commented Feb 28, 2022

Pulled out of #388. When styles are applied using the custom wp-container-* classes, these are not applied to the preview content. This is most obvious if you try to add & center a button:

Editor:

Frontend preview:

The root of the issue is that the inline style tags are added on a hook, either wp_footer or wp_enqueue_scripts (source), rather than output directly inline, so the API response does not contain the styles (see WordPress/gutenberg#35376 (comment), WordPress/gutenberg#38167).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Theme The frontend of the pattern directory, pattern lists UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant