Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: collapse container height when appearance set to interaction-only #54

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

jinsley8
Copy link
Contributor

@jinsley8 jinsley8 commented Feb 16, 2024

Description

When the appearance is set to interaction-only, the container's height is set to height: '0px', yet it occupies 24px of height, visible as empty space, even though the children div also have height: 0px.

This fix addresses the issue by adding display: flex to the container height for appearance: interaction-only. This change collapses the parent container height if the children have no height.

Changes Made

  • Added display: flex to the container height for appearance: interaction-only.

Visual Comparison

Before Fix After Fix After Fix When Visible
turnstile-before turnstile-after turnstile-after-visible
Container Height = 24px Container Height = 0px Container Height = 65px

Additional Notes

  • The turnstile container will still change to the rendered height depending on size.

Copy link

vercel bot commented Feb 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-turnstile ❌ Failed (Inspect) Feb 16, 2024 6:18pm

@marsidev marsidev merged commit 3719e0f into marsidev:main Feb 16, 2024
6 of 7 checks passed
@marsidev
Copy link
Owner

Thank you! @jinsley8

@jinsley8 jinsley8 deleted the fix/interaction-only-sizing branch February 16, 2024 23:25
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.

2 participants