-
Notifications
You must be signed in to change notification settings - Fork 364
feat(clerk-js): Introduce Clerk CSS variables for theming #6275
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
base: main
Are you sure you want to change the base?
feat(clerk-js): Introduce Clerk CSS variables for theming #6275
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
!snapshot |
…le-utilities-for-current-variables
Hey @alexcarpenter - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact |
Description
This PR exposes the ability to theme Clerk components using CSS custom properties, avoiding the need to pass variables into the appearance variables prop.
All of the variables support an accompanying clerk prefixed CSS custom property. The CSS custom property is using kebab casing.
e.g.
colorPrimary
=--clerk-color-primary
.The equivalent using the appearance prop would be:
Deprecated variables
This PR also makes some updates to current variable names, with deprecation notices to migrate to the updated keys.
colorText
colorForeground
colorTextOnPrimaryBackground
colorPrimaryForeground
colorTextSecondary
colorMutedForeground
spacingUnit
spacing
colorInputText
colorInputForeground
colorInputBackground
colorInput
New variables
colorRing
- The color of the ring when an interactive element is focused.colorMuted
- The background color for elements of lower importance, eg: a muted background.colorShadow
- The color used as the base for all shadows.Resolves USER-2202
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change