Skip to content

fix: make sure content gates can use wide/full width blocks#2625

Open
laurelfulford wants to merge 1 commit intotrunkfrom
fix/content-gate-width
Open

fix: make sure content gates can use wide/full width blocks#2625
laurelfulford wants to merge 1 commit intotrunkfrom
fix/content-gate-width

Conversation

@laurelfulford
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

The Content Gates let you use wide and full-width blocks, but the theme's styles were preventing them from being respected by the inline gates.

This PR tweaks the CSS so they should work.

How to test the changes in this Pull Request:

  1. Set up Content Gating (either with Memberships or the new in-development approach), and use one of the Content Gate patterns with wide blocks as the base.
  2. Make sure you have at least one gated post with a one column template.
  3. View the post in an incognito window and note the pattern is not wide.
CleanShot 2026-02-02 at 12 57 26@2x
  1. Apply the PR and run npm run build.
  2. Confirm the gate now displays wide:
CleanShot 2026-02-02 at 12 58 07@2x
  1. Try editing the gate and changing the outer block to full-width; confirm that also works.
  2. Edit the post and switch the template to 'default'; confirm the gate doesn't go past the content width.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes CSS styling to enable wide and full-width blocks within content gates. The theme's styles were previously preventing wide and full-width alignment classes from being properly applied to blocks inside inline content gates.

Changes:

  • Added .newspack-content-gate__inline-gate selector to wide template alignment rules
  • Added .newspack-content-gate__inline-gate > * selector to feature template alignment rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The issue or pull request needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant