Skip to content

Commit b46d0f5

Browse files
committed
fix(style): Ensure all text elements in Clerk components are white, since the background is always dark
1 parent 39444c6 commit b46d0f5

1 file changed

Lines changed: 29 additions & 7 deletions

File tree

pages/_app.tsx

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,36 @@ function MyApp({ Component, pageProps: { ...pageProps } }: AppProps) {
3939
appearance={{
4040
baseTheme: dark,
4141
elements: {
42-
//* Ensure Clerk elements use their default font
43-
formButtonPrimary: 'font-sans',
44-
card: 'font-sans',
42+
//* Ensure all text is white and visible in dark mode
43+
userButtonPopoverCard:
44+
'text-white [&_svg]:text-white [&_*]:text-white',
45+
userButtonPopoverActionButton: '[&_svg]:text-white [&_*]:text-white',
46+
userButtonPopoverFooter: '[&_svg]:text-white [&_*]:text-white',
47+
//* Dashboard and general text styling
48+
pageScrollBox: 'text-white [&_*]:text-white',
49+
card: 'font-sans text-white [&_*]:text-white',
4550
navbar: 'font-sans',
46-
//* Ensure icons are visible in dark mode
47-
userButtonPopoverCard: 'text-white [&_svg]:text-white',
48-
userButtonPopoverActionButton: '[&_svg]:text-white',
49-
userButtonPopoverFooter: '[&_svg]:text-white'
51+
headerTitle: 'text-white',
52+
headerSubtitle: 'text-white',
53+
socialButtonsBlockButton: 'text-white',
54+
formFieldLabel: 'text-white',
55+
formFieldInput: 'text-white',
56+
formFieldInputShowPasswordButton: 'text-white',
57+
formResendCodeLink: 'text-white',
58+
footerActionLink: 'text-white',
59+
footerActionText: 'text-white',
60+
identityPreviewText: 'text-white',
61+
identityPreviewEditButton: 'text-white',
62+
formButtonPrimary: 'font-sans text-white',
63+
formButtonSecondary: 'text-white',
64+
dividerLine: 'text-white',
65+
dividerText: 'text-white',
66+
alertText: 'text-white',
67+
alert: 'text-white',
68+
modalBackdrop: 'text-white',
69+
modalContent: 'text-white [&_*]:text-white',
70+
//* Ensure all text elements in Clerk components are white
71+
'*': 'text-white'
5072
}
5173
}}
5274
>

0 commit comments

Comments
 (0)