Repository navigation
Conversation
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>
forgetso
force-pushed
the
prosopo-procaptcha-inline-block-width
branch
from
October 18, 2026 11:26
54fe623 to
dc4555c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Follow-up to #851, which switched
<mc4wp-procaptcha>fromdisplay: blocktodisplay: inline-blockso the widget inherits the surrounding form'stext-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:Reported on themangoroad.com, running 4.14.1. Under
display: blockthe wrapper filled its parent and the widget'smax-widthcapped 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, andmax-width: 100%keeps the widget shrinking inside parents narrower than that.display: inline-blockis 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
php -lclean.🤖 Generated with Claude Code