Skip to content

Prosopo Procaptcha: give the inline-block wrapper a definite width - #858

Open
forgetso wants to merge 1 commit into
ibericode:mainfrom
prosopo:prosopo-procaptcha-inline-block-width
Open

forgetso wants to merge 1 commit into
ibericode:mainfrom
prosopo:prosopo-procaptcha-inline-block-width

Conversation

@forgetso

@forgetso forgetso commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #851, which switched <mc4wp-procaptcha> from display: block to display: inline-block so the widget inherits the surrounding form's text-align.

inline-block is shrink-to-fit, and the Procaptcha widget sizes itself in percentages under a max-width — it has no intrinsic width of its own for a parent to shrink-wrap around. So the wrapper collapses to the widget's minimum size instead of its natural 302px, which also leaves room for the submit button to flow up alongside it:

Collapsed Procaptcha widget in an MC4WP form

Reported on themangoroad.com, running 4.14.1. Under display: block the wrapper filled its parent and the widget's max-width capped it, so the missing intrinsic width only became visible after #851.

Fix

Add width: 302px; max-width: 100% to the wrapper's inline style. 302px is the widget's natural width, so the shrink-to-fit calculation has something definite to use, and max-width: 100% keeps the widget shrinking inside parents narrower than that. display: inline-block is unchanged, so #851's alignment behaviour is preserved.

We're fixing the missing intrinsic width in the Procaptcha widget itself as well, but this keeps the integration correct regardless of which widget version a site loads.

Test plan

🤖 Generated with Claude Code

The Procaptcha widget sizes itself in percentages under a max-width and has
no intrinsic width of its own, so in the shrink-to-fit context inline-block
creates it collapses to its minimum size instead of its natural 302px.

Set width: 302px with max-width: 100% so it still shrinks inside narrower
parents, and keep inline-block for alignment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant