Skip to content

docs(world-id): center the Beta badge on the Selfie Check card heading - #185

Merged
soamdesai-tfh merged 1 commit into
mainfrom
soam/beta-selfie-check-inline-4bee51
Sep 16, 2026
Merged

soamdesai-tfh merged 1 commit into
mainfrom
soam/beta-selfie-check-inline-4bee51

Conversation

@soamdesai-tfh

Copy link
Copy Markdown
Contributor

What

On the World ID overview page, the Beta badge next to "Selfie Check" in the credential cards sat visibly below the heading text. This centers it on the text.

Why it happened

Mintlify's heading component wraps a JSX heading's children in its own <span class="cursor-pointer">, so flex items-center gap-2 on the <h3> only aligned that wrapper. Inside it the badge was a plain inline span with baseline alignment, which made it hang low.

Fix

  • Move the alignment onto an inner inline-flex flex-wrap items-center gap-x-2 gap-y-1 span around the label and badge.
  • flex-wrap keeps today's behavior in narrow grid columns: the badge wraps under the label instead of forcing the label onto two lines.
  • Heading text content and anchor id (selfie-check-beta) are unchanged.
  • Drops the no-op method-pill class (Mintlify's internal API-method badge class; its only rule is print-color-adjust).

Verification

Prototyped the exact styles on the production DOM and measured with getBoundingClientRect:

Card width Result
514px (single column) One line; badge center within 1.3px of the cap-height center, 8px gap
145px (three columns at a 1024px viewport) Badge wraps under the label, as before

The page compiles with the repo's MDX toolchain and cspell passes.

Mintlify wraps a JSX heading's children in its own span, so the flex
alignment on the h3 never reached the label and badge; the badge fell
back to baseline alignment and hung below the text. Move the alignment
onto an inner inline-flex span that wraps under the label at narrow
widths, and drop the no-op method-pill class.
@mintlify

mintlify Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
world 🟢 Ready View Preview Sep 16, 2026, 6:55 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@Takaros999 Takaros999 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved: focused MDX markup fix for badge alignment; current checks are green.

@soamdesai-tfh
soamdesai-tfh merged commit 1d3bbd8 into main Sep 16, 2026
9 checks passed
@soamdesai-tfh
soamdesai-tfh deleted the soam/beta-selfie-check-inline-4bee51 branch September 16, 2026 19:13
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