fix: tweak inline gate styles for block theme#4445
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the inline Content Gate's styling to properly respect block widths in the block theme, ensuring gates display correctly across different layout templates.
Changes:
- Added CSS styling to constrain inline gate maximum width
- Updated inline gate wrapper to include block layout class
- Added max-width constraint to fade overlay element
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/content-gate/gate.scss | Adds max-width constraint to inline gate container |
| includes/content-gate/trait-content-gate-layout.php | Applies layout-constrained class and max-width to gate wrapper and fade overlay |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @chickenn00dle! |
|
Hey @laurelfulford, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [6.33.0-alpha.1](v6.32.0...v6.33.0-alpha.1) (2026-02-19) ### Bug Fixes * add bock theme check before switching templates to prevent warnings ([#4412](#4412)) ([dfb5b63](dfb5b63)) * add check for my account before switching error notice ([#4484](#4484)) ([0cb3ae8](0cb3ae8)) * add fallback selector for the content gate in block theme ([#4431](#4431)) ([dd0b2b1](dd0b2b1)) * **avatar:** show placeholder for text-only custom bylines in editor ([#4456](#4456)) ([56d3278](56d3278)) * **content-gate:** create gate layout with 'publish' status ([#4483](#4483)) ([108215a](108215a)) * **content-gate:** prevent metering from bypassing account verification requirement ([#4459](#4459)) ([90aed19](90aed19)) * **my-account:** hide payment method dropdown if only has one child and is disabled ([#4472](#4472)) ([6e3c3f5](6e3c3f5)) * **my-account:** missing padding on labels ([#4479](#4479)) ([6c6d183](6c6d183)) * tweak inline gate styles for block theme ([#4445](#4445)) ([d867a53](d867a53)) ### Features * **content-gating:** new UI for adding/editing content gates ([#4474](#4474)) ([a193ecc](a193ecc)) * **data-events:** handler retry and ActionScheduler support ([#4469](#4469)) ([c997f38](c997f38)) * integrations - rename classes and move can_sync ([#4451](#4451)) ([877ce4f](877ce4f)) * integrations barebones ([#4433](#4433)) ([79bf9a7](79bf9a7)) * **my-account:** block theme styles ([#4430](#4430)) ([1629465](1629465)) * **my-account:** improve navigation on small screens ([#4471](#4471)) ([3404a66](3404a66)) * **newspack-components:** add divider component ([#4462](#4462)) ([f080d72](f080d72))
|
🎉 This PR is included in version 6.33.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [6.34.0-alpha.1](v6.33.0...v6.34.0-alpha.1) (2026-03-02) ### Bug Fixes * add bock theme check before switching templates to prevent warnings ([#4412](#4412)) ([dfb5b63](dfb5b63)) * add check for my account before switching error notice ([#4484](#4484)) ([0cb3ae8](0cb3ae8)) * add fallback selector for the content gate in block theme ([#4431](#4431)) ([dd0b2b1](dd0b2b1)) * **avatar:** show placeholder for text-only custom bylines in editor ([#4456](#4456)) ([56d3278](56d3278)) * **content-gate:** create gate layout with 'publish' status ([#4483](#4483)) ([108215a](108215a)) * **content-gate:** prevent metering from bypassing account verification requirement ([#4459](#4459)) ([90aed19](90aed19)) * **my-account:** hide payment method dropdown if only has one child and is disabled ([#4472](#4472)) ([6e3c3f5](6e3c3f5)) * **my-account:** missing padding on labels ([#4479](#4479)) ([6c6d183](6c6d183)) * tweak inline gate styles for block theme ([#4445](#4445)) ([d867a53](d867a53)) ### Features * **content-gating:** new UI for adding/editing content gates ([#4474](#4474)) ([a193ecc](a193ecc)) * **data-events:** handler retry and ActionScheduler support ([#4469](#4469)) ([c997f38](c997f38)) * integrations - rename classes and move can_sync ([#4451](#4451)) ([877ce4f](877ce4f)) * integrations barebones ([#4433](#4433)) ([79bf9a7](79bf9a7)) * **my-account:** block theme styles ([#4430](#4430)) ([1629465](1629465)) * **my-account:** improve navigation on small screens ([#4471](#4471)) ([3404a66](3404a66)) * **newspack-components:** add divider component ([#4462](#4462)) ([f080d72](f080d72))
|
🎉 This PR is included in version 6.34.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [6.34.0](v6.33.0...v6.34.0) (2026-03-02) ### Bug Fixes * add bock theme check before switching templates to prevent warnings ([#4412](#4412)) ([dfb5b63](dfb5b63)) * add check for my account before switching error notice ([#4484](#4484)) ([0cb3ae8](0cb3ae8)) * add fallback selector for the content gate in block theme ([#4431](#4431)) ([dd0b2b1](dd0b2b1)) * **avatar:** show placeholder for text-only custom bylines in editor ([#4456](#4456)) ([56d3278](56d3278)) * **content-gate:** create gate layout with 'publish' status ([#4483](#4483)) ([108215a](108215a)) * **content-gate:** prevent metering from bypassing account verification requirement ([#4459](#4459)) ([90aed19](90aed19)) * **my-account:** hide payment method dropdown if only has one child and is disabled ([#4472](#4472)) ([6e3c3f5](6e3c3f5)) * **my-account:** missing padding on labels ([#4479](#4479)) ([6c6d183](6c6d183)) * tweak inline gate styles for block theme ([#4445](#4445)) ([d867a53](d867a53)) ### Features * **content-gating:** new UI for adding/editing content gates ([#4474](#4474)) ([a193ecc](a193ecc)) * **data-events:** handler retry and ActionScheduler support ([#4469](#4469)) ([c997f38](c997f38)) * integrations - rename classes and move can_sync ([#4451](#4451)) ([877ce4f](877ce4f)) * integrations barebones ([#4433](#4433)) ([79bf9a7](79bf9a7)) * **my-account:** block theme styles ([#4430](#4430)) ([1629465](1629465)) * **my-account:** improve navigation on small screens ([#4471](#4471)) ([3404a66](3404a66)) * **newspack-components:** add divider component ([#4462](#4462)) ([f080d72](f080d72))
|
🎉 This PR is included in version 6.34.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
This PR makes some tweaks to the inline Content Gate so it respects block widths.
It needs to be tested with the Classic Theme with this PR: Automattic/newspack-theme#2625
And it needs to be tested with the Block theme with this PR: Automattic/newspack-block-theme#407
Closes NPPD-1180
How to test the changes in this Pull Request:
Other information: