Blocks: Improve Rendering Accuracy #850
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Improves the rendering accuracy between the block editor and frontend site.
Broadcasts
Editor: Include the container div, so that settings such as
Display orderandDisplay as gridare reflected in the block editor. These always correctly display on the frontend site, but failed to display since introducing #842, which removed the container div in the block editor to prevent double margins/paddings rendering.Before:

After:

Form Trigger and Product
Frontend: Enqueue the
wp-block-buttonstylesheet, so that buttons render the same (i.e. with border radius) as the standard WordPress button block, on which the Form Trigger + Product buttons are based.Before:

After:

Testing
Updated Form Trigger and Product tests to confirm WordPress' button block styles are included in frontend output.
Visual tests performed to confirm output accurate between the block editor and frontend.
Checklist