fix(ui): keep checked checkbox checkmark legible across themes#9074
Conversation
🦋 Changeset detectedLatest commit: 989872f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe checkbox checked-state checkmark rendering in Input.tsx was changed from an inline SVG background image with a hardcoded white fill to a CSS mask applied via a ChangesCheckbox checkmark theming
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
| '&::before': { | ||
| content: '""', | ||
| position: 'absolute', | ||
| inset: 0, | ||
| backgroundColor: theme.colors.$colorPrimaryForeground, | ||
| maskImage: checkboxCheckmarkMask, | ||
| WebkitMaskImage: checkboxCheckmarkMask, | ||
| maskPosition: 'center', | ||
| WebkitMaskPosition: 'center', | ||
| maskRepeat: 'no-repeat', | ||
| WebkitMaskRepeat: 'no-repeat', | ||
| maskSize: `${theme.sizes.$2} ${theme.sizes.$2}`, | ||
| WebkitMaskSize: `${theme.sizes.$2} ${theme.sizes.$2}`, |
There was a problem hiding this comment.
love having to do the old masked icon trick for responsive fills 😑
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Description
Fixes the checked checkbox rendering as a blank filled box in dark themes. Previously the checkmark was baked into an SVG
background-imagewith a hardcoded white fill, which disappeared against the lightprimary500box in dark mode. The checkmark is now drawn on a masked::beforeoverlay whosebackgroundColoruses thecolorPrimaryForegroundtheme token, so it stays legible across light, dark, and custom themes. To test, render any checkbox (e.g. the sign-up legal consent checkbox) in a dark appearance and confirm the checkmark is visible when checked.Included light mode to show that still works as expected.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit