-
Notifications
You must be signed in to change notification settings - Fork 418
feat(clerk-js,themes,types): Introduce Clerk CSS variables #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
Merged
alexcarpenter
merged 45 commits into
main
from
alexcarpenter/user-2202-add-clerk-css-variable-utilities-for-current-variables
Jul 15, 2025
Merged
Changes from 31 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
e0e6ef6
feat(clerk-js): Expose CSS variables for clerk appearance variables
alexcarpenter e246501
handle colorTextSecondary
alexcarpenter 3d4fd36
update sizes and typography foundations
alexcarpenter 9a2a9c6
handle types
alexcarpenter d9740c3
fix exports
alexcarpenter be27f20
fix application logo sizing
alexcarpenter c8f61e2
chore(clerk-js,themes,types): Variable migration (#6282)
alexcarpenter c65258c
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter daac718
feat(clerk-js): Expose CSS variables for clerk appearance variables (…
alexcarpenter f5c57ce
fix card footer background color
alexcarpenter f4bf7cc
simplify
alexcarpenter 4270b50
handle font size scale
alexcarpenter 9d7f66c
fix font-size-md usage
alexcarpenter e950c30
feat(clerk-js): Add `colorBorder` variable option (#6307)
alexcarpenter a65aae1
update descriptions
alexcarpenter 444a6ea
Merge branch 'alexcarpenter/user-2202-add-clerk-css-variable-utilitie…
alexcarpenter aa65eec
feat(clerk-js): Add `colorShadow` variable option (#6290)
alexcarpenter 2731ea8
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter 6dc4f9c
add changeset
alexcarpenter 13e0eaf
Merge branch 'alexcarpenter/user-2202-add-clerk-css-variable-utilitie…
alexcarpenter 8a63e93
Update bundlewatch.config.json
alexcarpenter 79f2499
sort imports
alexcarpenter e173b68
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter a7c3ea8
add test
alexcarpenter 25cbdc3
fix $colorText usage and handle more border colors
alexcarpenter 27254c0
Update bundlewatch.config.json
alexcarpenter 83a1994
fix border fallback
alexcarpenter 82a70ba
more border color updates
alexcarpenter c191125
feat(clerk-js): Add `colorModalBackdrop` variable option (#6312)
alexcarpenter 17d3087
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter 91cdac4
fix(clerk-js): Use fractions for variable ratios (#6314)
alexcarpenter 76ae286
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter f1e46eb
Update bundlewatch.config.json
alexcarpenter 4540a74
Update bundlewatch.config.json
alexcarpenter a92f6b8
fix createMutedForegroundColor fallback
alexcarpenter 0f7cc63
Update bundlewatch.config.json
alexcarpenter 5c0cdb9
fix: update resolveCSSVariable to be recursive to handle fallback css…
alexcarpenter 077f7d6
Update bundlewatch.config.json
alexcarpenter a522c9d
update tests
alexcarpenter 876741d
lint
alexcarpenter de632bd
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter da17e0c
Update bundlewatch.config.json
alexcarpenter e6d1ec2
Merge branch 'alexcarpenter/user-2202-add-clerk-css-variable-utilitie…
alexcarpenter 590d502
Merge branch 'main' into alexcarpenter/user-2202-add-clerk-css-variab…
alexcarpenter 4b1bada
Update .changeset/cuddly-heads-battle.md
alexcarpenter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| '@clerk/clerk-js': minor | ||
| '@clerk/themes': minor | ||
| '@clerk/types': minor | ||
| --- | ||
|
|
||
| Expose Clerk CSS variables as an option for theming Clerk's components. This change introduces CSS custom properties that allow developers to customize Clerk's appearance using standard CSS variables, providing a more flexible theming approach. | ||
|
|
||
|
|
||
| ```css | ||
| :root { | ||
| --clerk-color-primary: #6D47FF; | ||
| --clerk-color-primary-foreground: #FFFFFF; | ||
| } | ||
| ``` | ||
|
|
||
| ## Deprecated variables | ||
|
|
||
|
|
||
| | Deprecated | New | | ||
| |--------|--------| | ||
| | `colorText` | `colorForeground` | | ||
| | `colorTextOnPrimaryBackground` | `colorPrimaryForeground` | | ||
| | `colorTextSecondary` | `colorMutedForeground` | | ||
| | `spacingUnit` | `spacing` | | ||
| | `colorInputText` | `colorInputForeground` | | ||
| | `colorInputBackground` | `colorInput` | | ||
|
|
||
| Deprecated variables will continue to work but will be removed in the next major version. | ||
|
|
||
| ## 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 base shadow color used in the components. | ||
| - `colorBorder` - The base border color used in the components. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.