Skip to content

fix(swingset): preserve Mosaic colors in production builds - #9283

Merged
alexcarpenter merged 2 commits into
mainfrom
austin/stylex-lighning-css-fix
Jul 30, 2026
Merged

fix(swingset): preserve Mosaic colors in production builds#9283
alexcarpenter merged 2 commits into
mainfrom
austin/stylex-lighning-css-fix

Conversation

@austincalvelage

Copy link
Copy Markdown
Member

Description

In production Lightning CSS sees light-dark() and tries to convert it for older browsers. That conversion doesn’t work correctly with StyleX’s extracted variables, so the colors become invalid.

The config tells Lightning CSS that Mosaic targets browsers that already support light-dark() so it leaves the colors unchanged.

parcel-bundler/lightningcss#873 (comment)

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:

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ef5431

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Jul 30, 2026 3:04am
swingset Ready Ready Preview Jul 30, 2026 3:04am

Request Review

@github-actions github-actions Bot added the ui label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a shared mosaicLightningCssTargets configuration for browser versions and uses it in both the tsdown Mosaic configuration and Swingset’s Next.js StyleX plugin configuration. The shared configuration replaces the previous inline target calculation in tsdown. A Changesets entry is also added.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: alexcarpenter, maxyinger

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: fixing Swingset production builds to preserve Mosaic colors.
Description check ✅ Passed The description is directly related and correctly explains the Lightning CSS target change and its purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9283

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9283

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9283

@clerk/expo

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9283

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9283

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9283

@clerk/upgrade

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

@clerk/vue

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

commit: 5ef5431

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-30T03:04:12.618Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 5ef5431.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/bright-glasses-hammer.md:
- Around line 1-2: Add the affected package entries and appropriate semver bump
levels to the changeset frontmatter, then write a concise release summary
describing the production Lightning CSS configuration change. Keep the changeset
valid for changeset version and publish workflows.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: a3df5ae5-5c02-4365-b43b-7ff458091164

📥 Commits

Reviewing files that changed from the base of the PR and between 3233803 and 5ef5431.

📒 Files selected for processing (1)
  • .changeset/bright-glasses-hammer.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)
  • clerk/cli (auto-detected)

Comment on lines +1 to +2
---
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Add the affected package bumps and release summary.

This changeset is empty, so changeset version/publish will not release or document the production Lightning CSS configuration change. Add the affected package names, appropriate semver bumps, and a concise summary.

As per coding guidelines, Changesets must be used for version management and changelogs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/bright-glasses-hammer.md around lines 1 - 2, Add the affected
package entries and appropriate semver bump levels to the changeset frontmatter,
then write a concise release summary describing the production Lightning CSS
configuration change. Keep the changeset valid for changeset version and publish
workflows.

Source: Coding guidelines

@alexcarpenter
alexcarpenter merged commit a90a93b into main Jul 30, 2026
52 checks passed
@alexcarpenter
alexcarpenter deleted the austin/stylex-lighning-css-fix branch July 30, 2026 12:32
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