Skip to content

feat(themes): Add shadcn.css export #6415

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

Conversation

alexcarpenter
Copy link
Member

@alexcarpenter alexcarpenter commented Jul 28, 2025

Description

Add shadcn.css export, which points to the source shadcn theme so that the tailwind compiler can pick up the classes used in the theme.

@import '@clerk/themes/shadcn.css'

Resolves USER-2471

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Chores

    • Updated build scripts and configuration for improved packaging and compatibility.
    • Added a new build tool and adjusted related scripts for development and linting.
    • Enhanced export definitions for better module resolution and CSS file support.
  • Style

    • Linked a CSS file to its corresponding JavaScript source for improved theme integration.
  • New Features

    • Enabled importing of a CSS theme file to ensure proper style detection and application with Tailwind CSS.

Copy link

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: 0ca547e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/themes Patch

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

Copy link

vercel bot commented Jul 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2025 5:20pm

Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

📝 Walkthrough

"""

Walkthrough

The changes introduce updates to the @clerk/themes package's build and packaging configuration. The package.json now uses an explicit "exports" field for module entry points, updates the "main", "module", and "types" fields, and switches build tooling from tsc to tsup. A new tsup.config.ts file configures the build process, including copying CSS files to the distribution directory. The shadcn.css file is modified to include a @source directive. A placeholder changeset file is also added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Add .css file with safelist classes and include @import "@clerk/themes/shadcn.css"; (USER-2471)
The source of that CSS file should be @source "./dist/themes/src/themes/shadcn.js"; (USER-2471)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Build tooling switched from tsc to tsup and new tsup.config.ts added (packages/themes/package.json, packages/themes/tsup.config.ts) The linked issue only requires the addition of a CSS file with a specific directive; changing build tooling is not specified.
Addition of changeset placeholder file (.changeset/puny-hounds-eat.md) The linked issue does not mention changeset management or documentation updates.
"""

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e8a2cb and 0ca547e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • .changeset/puny-hounds-eat.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/puny-hounds-eat.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Build Packages
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af615b8 and 9245edb.

📒 Files selected for processing (3)
  • packages/themes/package.json (2 hunks)
  • packages/themes/src/themes/shadcn.css (1 hunks)
  • packages/themes/tsup.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/themes/package.json
  • packages/themes/src/themes/shadcn.css
  • packages/themes/tsup.config.ts
packages/*/package.json

📄 CodeRabbit Inference Engine (.cursor/rules/global.mdc)

All publishable packages should be placed under the packages/ directory

packages/*/package.json: All publishable packages must be located in the 'packages/' directory.
All packages must be published under the @clerk namespace on npm.
Semantic versioning must be used across all packages.

Files:

  • packages/themes/package.json
**/*

⚙️ CodeRabbit Configuration File

**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

Whenever reviewing a pull request, if there are any changes that could impact security, always tag @clerk/security in the PR.

Security-impacting changes include, but are not limited to:

  • Changes to authentication logic or mechanisms (e.g. login, session handling, token issuance)
  • Any modification to access control, authorization checks, or role-based permissions
  • Introduction or modification of hashing algorithms, signature verification, or cryptographic primitives
  • Handling of sensitive data (e.g. passwords, tokens, secrets, PII)
  • Integration with external identity providers (e.g. SSO, OAuth, OpenID Connect)
  • Modifications to security headers, cookie flags, CORS policies, or CSRF protections
  • Bypass mechanisms (e.g. feature flags, testing overrides) that could weaken protections
  • Changes to rate limiting, abuse prevention, or input validation

If you're unsure whether a change is security-relevant, err on the side of caution and tag @clerk/security.

Any time that you tag @clerk/security, please do so explicitly in a code comment, rather than within a collapsed section in a coderabbit comment, such as the "recent review details" section. If you do use the team name in any thinking or non-direct-code-comment content, it can be referred to as "clerk security team" to avoid accidentally printing the tag which sends a notification to the team.

Files:

  • packages/themes/package.json
  • packages/themes/src/themes/shadcn.css
  • packages/themes/tsup.config.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • packages/themes/tsup.config.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/themes/tsup.config.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/themes/tsup.config.ts
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • packages/themes/tsup.config.ts
packages/*/tsup.config.{js,ts}

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

TypeScript compilation and bundling must use tsup.

Files:

  • packages/themes/tsup.config.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • packages/themes/tsup.config.ts
🪛 GitHub Actions: CI
packages/themes/package.json

[error] 1-1: pnpm install failed due to outdated lockfile. The pnpm-lock.yaml is not up to date with packages/themes/package.json. One dependency (tsup@catalog:repo) was added but not reflected in the lockfile. Use 'pnpm install --no-frozen-lockfile' to bypass.

🪛 ESLint
packages/themes/tsup.config.ts

[error] 28-28: 'error' is defined but never used.

(@typescript-eslint/no-unused-vars)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
packages/themes/src/themes/shadcn.css (1)

1-1: Clarify custom @source directive and path dependency

It looks like packages/themes/src/themes/shadcn.css uses a non-standard CSS directive pointing at the built JS artifact:

@source "./dist/themes/shadcn.js";

This creates a dependency from your source files on the output in dist/, which can lead to build-order or circular-reference issues.

Please clarify:

  • What build tool or loader processes this @source directive?
  • Should the path point to the source JS (e.g. src/themes/shadcn.js) or be adjusted to match the final output location?
  • If this is intentional, can you confirm no other theme files use the same pattern so we avoid hidden breakages?
packages/themes/tsup.config.ts (1)

5-14: LGTM! Solid tsup configuration.

The build configuration properly handles both CJS and ESM outputs with TypeScript declarations. The settings are appropriate for a theme package.

packages/themes/package.json (2)

27-37: LGTM! Modern package.json structure with proper exports.

The migration to explicit exports field with separate TypeScript, ESM, and CJS entry points follows best practices. The CSS export aligns perfectly with the PR objectives.


33-33: CSS export path correctly matches build output

Verified that packages/themes/src/themes/shadcn.css exists and the tsup onSuccess hook copies all .css files—including shadcn.css—to dist/themes/shadcn.css, which aligns with the export in packages/themes/package.json. No changes required.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/themes/src/themes/shadcn.css (2)

14-17: Use the dedicated --font-weight-bold token instead of aliasing to semibold

Both --clerk-font-weight-semibold and --clerk-font-weight-bold currently resolve to var(--font-weight-semibold).
If a --font-weight-bold variable exists in the upstream design-tokens (which is common), mapping the Clerk token to the correct value will avoid subtle typography inconsistencies.

-  --clerk-font-weight-bold: var(--font-weight-semibold);
+  --clerk-font-weight-bold: var(--font-weight-bold);

1-45: Consider adding visual-regression or snapshot tests for the new theme

This PR introduces user-facing styling that can affect component appearance. While unit tests don’t apply to pure CSS, a lightweight set of Storybook stories or visual-regression snapshots (e.g. Playwright, Chromatic) would catch unintended changes during future refactors.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9245edb and 25f342a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/themes/src/themes/shadcn.css (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/themes/src/themes/shadcn.css
**/*

⚙️ CodeRabbit Configuration File

**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

Whenever reviewing a pull request, if there are any changes that could impact security, always tag @clerk/security in the PR.

Security-impacting changes include, but are not limited to:

  • Changes to authentication logic or mechanisms (e.g. login, session handling, token issuance)
  • Any modification to access control, authorization checks, or role-based permissions
  • Introduction or modification of hashing algorithms, signature verification, or cryptographic primitives
  • Handling of sensitive data (e.g. passwords, tokens, secrets, PII)
  • Integration with external identity providers (e.g. SSO, OAuth, OpenID Connect)
  • Modifications to security headers, cookie flags, CORS policies, or CSRF protections
  • Bypass mechanisms (e.g. feature flags, testing overrides) that could weaken protections
  • Changes to rate limiting, abuse prevention, or input validation

If you're unsure whether a change is security-relevant, err on the side of caution and tag @clerk/security.

Any time that you tag @clerk/security, please do so explicitly in a code comment, rather than within a collapsed section in a coderabbit comment, such as the "recent review details" section. If you do use the team name in any thinking or non-direct-code-comment content, it can be referred to as "clerk security team" to avoid accidentally printing the tag which sends a notification to the team.

Files:

  • packages/themes/src/themes/shadcn.css
🪛 Biome (2.1.2)
packages/themes/src/themes/shadcn.css

[error] 24-24: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

background-color is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 24-24: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

background-color is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
packages/themes/src/themes/shadcn.css (2)

23-25: Verify build-time support for @variant and --alpha() syntax

@variant dark and the custom --alpha() function are not part of standard CSS.
Unless the build pipeline (e.g. Tailwind v4 previews or a PostCSS plugin) rewrites these constructs, they will ship verbatim and be ignored by browsers, leaving the dark-mode background unset.

Please confirm that:

  1. The post-processing step that transforms @variant into a dark-mode selector is enabled for the published artifact.
  2. --alpha() is converted to a valid color function (e.g. rgba() / color-mix()).

If those transforms are not applied, consider rewriting the rule to plain CSS:

-  @variant dark {
-    background-color: --alpha(var(--clerk-color-input) / 30%);
-  }
+  @media (prefers-color-scheme: dark) {
+    .cl-input {
+      background-color: color-mix(in srgb, var(--clerk-color-input) 30%, transparent);
+    }
+  }

23-25: Duplicate background-color flagged by linter is a false positive

Biome reports a duplicate property here, but the second declaration is scoped to the dark-mode variant. No action required once the build-time transform (see previous comment) is confirmed.

@alexcarpenter
Copy link
Member Author

!snapshot

Copy link

pkg-pr-new bot commented Jul 29, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6415

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6415

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6415

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6415

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6415

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6415

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6415

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6415

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6415

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6415

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6415

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6415

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6415

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6415

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6415

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6415

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6415

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6415

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6415

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6415

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6415

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6415

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6415

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6415

commit: 0ca547e

@alexcarpenter
Copy link
Member Author

!snapshot

@clerk clerk deleted a comment from clerk-cookie Jul 29, 2025
@alexcarpenter
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @alexcarpenter - the snapshot version command generated the following package versions:

Package Version
@clerk/themes 2.4.4-snapshot.v20250729183806

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/themes

npm i @clerk/[email protected] --save-exact

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/themes/src/themes/shadcn.css (1)

1-47: No automated check that shadcn.css is emitted & importable

This PR adds an exported asset but no test (e.g. Jest + postcss or a simple TS import assertion) to guarantee:

  1. @clerk/themes/shadcn.css exists in the published package.
  2. Importing it via the documented path succeeds.

Consider adding a minimal publish-simulation test or an e2e build step in CI to prevent future regressions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 498e797 and f145e82.

📒 Files selected for processing (1)
  • packages/themes/src/themes/shadcn.css (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/themes/src/themes/shadcn.css
**/*

⚙️ CodeRabbit Configuration File

**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

Whenever reviewing a pull request, if there are any changes that could impact security, always tag @clerk/security in the PR.

Security-impacting changes include, but are not limited to:

  • Changes to authentication logic or mechanisms (e.g. login, session handling, token issuance)
  • Any modification to access control, authorization checks, or role-based permissions
  • Introduction or modification of hashing algorithms, signature verification, or cryptographic primitives
  • Handling of sensitive data (e.g. passwords, tokens, secrets, PII)
  • Integration with external identity providers (e.g. SSO, OAuth, OpenID Connect)
  • Modifications to security headers, cookie flags, CORS policies, or CSRF protections
  • Bypass mechanisms (e.g. feature flags, testing overrides) that could weaken protections
  • Changes to rate limiting, abuse prevention, or input validation

If you're unsure whether a change is security-relevant, err on the side of caution and tag @clerk/security.

Any time that you tag @clerk/security, please do so explicitly in a code comment, rather than within a collapsed section in a coderabbit comment, such as the "recent review details" section. If you do use the team name in any thinking or non-direct-code-comment content, it can be referred to as "clerk security team" to avoid accidentally printing the tag which sends a notification to the team.

Files:

  • packages/themes/src/themes/shadcn.css
🪛 Biome (2.1.2)
packages/themes/src/themes/shadcn.css

[error] 24-24: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

background-color is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)


[error] 24-24: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

background-color is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
packages/themes/src/themes/shadcn.css (1)

20-26: Non-standard --alpha() function & duplicate background-color – verify build pipeline

The nested dark-mode rule relies on --alpha() (not a standard CSS function) and re-declares background-color, which triggered the linter warning about duplicates.
Confirm your build/post-processing toolchain (e.g. Tailwind, PostCSS plugin) rewrites this correctly; otherwise it will ship invalid CSS.

@alexcarpenter
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @alexcarpenter - the snapshot version command generated the following package versions:

Package Version
@clerk/themes 2.4.4-snapshot.v20250729190314

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/themes

npm i @clerk/[email protected] --save-exact

@alexcarpenter
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @alexcarpenter - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.1.16-snapshot.v20250730171217
@clerk/astro 2.10.13-snapshot.v20250730171217
@clerk/backend 2.6.2-snapshot.v20250730171217
@clerk/chrome-extension 2.5.15-snapshot.v20250730171217
@clerk/clerk-js 5.79.0-snapshot.v20250730171217
@clerk/elements 0.23.48-snapshot.v20250730171217
@clerk/clerk-expo 2.14.14-snapshot.v20250730171217
@clerk/expo-passkeys 0.3.25-snapshot.v20250730171217
@clerk/express 1.7.15-snapshot.v20250730171217
@clerk/fastify 2.4.15-snapshot.v20250730171217
@clerk/localizations 3.20.6-snapshot.v20250730171217
@clerk/nextjs 6.28.1-snapshot.v20250730171217
@clerk/nuxt 1.8.1-snapshot.v20250730171217
@clerk/clerk-react 5.38.1-snapshot.v20250730171217
@clerk/react-router 1.8.9-snapshot.v20250730171217
@clerk/remix 4.10.9-snapshot.v20250730171217
@clerk/shared 3.17.0-snapshot.v20250730171217
@clerk/tanstack-react-start 0.21.5-snapshot.v20250730171217
@clerk/testing 1.10.9-snapshot.v20250730171217
@clerk/themes 2.4.4-snapshot.v20250730171217
@clerk/types 4.72.0-snapshot.v20250730171217
@clerk/vue 1.9.1-snapshot.v20250730171217

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-react-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

@alexcarpenter alexcarpenter requested a review from brkalow July 30, 2025 17:18
@alexcarpenter alexcarpenter merged commit b515382 into main Jul 31, 2025
61 of 62 checks passed
@alexcarpenter alexcarpenter deleted the alexcarpenter/user-2471-add-css-file-with-safelist-classes branch July 31, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants