Automattic / newspack-theme

A theme for Newspack.
https://newspack.com
GNU General Public License v2.0
305 stars 66 forks source link

fix: remove margin from grid block #2342

Closed laurelfulford closed 4 months ago

laurelfulford commented 4 months ago

All Submissions:

Changes proposed in this Pull Request:

This PR is a replacement for https://github.com/Automattic/newspack-theme/pull/2336, but in hotfix form.

This PR makes a couple tweaks to the group block spacing to make the new Grid style, coming in WP 6.6.

This change also fixes an issue where blocks that have solid backgrounds should have no gap between them -- this should only be applied when the blocks a full-width, not all the time.

See: 1207594452716169-as-1207669473649576

How to test the changes in this Pull Request:

  1. Start on a test site running the latest WP 6.6 RC.
  2. Add a Grid block to the editor (or add a Group block and select the Grid variation).
  3. Add some blocks inside of the group block. This is easiest to test with blocks with backgrounds, like paragraphs or group blocks with stuff inside of them.
  4. View on the front-end -- you should have kind of a mismatchy, spacy mess, like:

image

  1. Apply this PR and run npm run build.
  2. Refresh the front-end and confirm you have a nicely formed grid:

image

  1. Try reordering/adding different blocks to make sure things behave fairly well.

Other information:

matticbot commented 4 months ago

:tada: This PR is included in version 1.90.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

matticbot commented 4 months ago

:tada: This PR is included in version 1.91.0-alpha.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: