Skip to content

fix(ui): render the Mosaic menu shadow as an outline in dark mode - #9414

Merged
alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-menu-dark-mode-outline
Aug 12, 2026
Merged

fix(ui): render the Mosaic menu shadow as an outline in dark mode#9414
alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-menu-dark-mode-outline

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Aug 12, 2026

Copy link
Copy Markdown
Member

Description

The Mosaic menu popup painted its light-mode drop shadow in dark mode, where it reads as a smudge instead of an edge. The menu now matches the Mosaic card: in dark mode the two drop shadows drop out and only the 1px ring stays, at 10% white.

BEFORE AFTER
Screenshot 2026-08-12 at 8 59 26 AM Screenshot 2026-08-12 at 8 57 04 AM
Screenshot 2026-08-12 at 8 59 40 AM Screenshot 2026-08-12 at 8 57 13 AM

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 Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d9700e7

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 Aug 12, 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 Aug 12, 2026 1:00pm
swingset Ready Ready Preview Aug 12, 2026 1:00pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: d9700e7

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The menu popup shadow now uses light-dark() to provide different shadow and outline colors for light and dark themes. A Changesets delimiter file was added without package or release metadata.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the dark-mode Mosaic menu shadow change.
Description check ✅ Passed The description explains the dark-mode menu styling bug, the fix, and the validation checks.
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.

@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 `@packages/ui/src/mosaic/components/menu/menu.styles.ts`:
- Around line 20-22: Update the boxShadow declaration in the menu styles to use
the repository’s lightDark utility for each light/dark color pair instead of raw
CSS light-dark() calls, preserving the existing colors and fallback behavior.
🪄 Autofix

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: e932874a-4730-45ea-b9f7-03e1c1dcda62

📥 Commits

Reviewing files that changed from the base of the PR and between 44edcc9 and d9700e7.

📒 Files selected for processing (2)
  • .changeset/mosaic-menu-dark-mode-outline.md
  • packages/ui/src/mosaic/components/menu/menu.styles.ts
🔗 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/cli (auto-detected)
  • clerk/clerk-android (auto-detected)

Comment on lines +20 to +22
boxShadow: `0 12px 12px -7px light-dark(oklch(0.2046 0 0 / 12%), transparent),
0 24px 24px -10px light-dark(oklch(0.2046 0 0 / 4%), transparent),
0 0 0 1px light-dark(oklch(0.2046 0 0 / 4%), oklch(1 0 0 / 10%))`,

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use lightDark instead of raw light-dark().

The declaration bypasses the repository’s support-aware helper. Browsers without light-dark() support can ignore the entire boxShadow declaration. Apply lightDark to each color value so the style keeps the supported fallback.

As per coding guidelines: “Use CSS light-dark() function via the lightDark utility ... for automatic light/dark mode support with fallbacks.” Repository context identifies packages/ui/src/utils/lightDark.ts:14-18 as the support-aware implementation.

Proposed fix
+import { lightDark } from '../../../utils/lightDark';
+
...
-    boxShadow: `0 12px 12px -7px light-dark(oklch(0.2046 0 0 / 12%), transparent),
-                0 24px 24px -10px light-dark(oklch(0.2046 0 0 / 4%), transparent),
-                0 0 0 1px light-dark(oklch(0.2046 0 0 / 4%), oklch(1 0 0 / 10%))`,
+    boxShadow: `0 12px 12px -7px ${lightDark('oklch(0.2046 0 0 / 12%)', 'transparent')},
+                0 24px 24px -10px ${lightDark('oklch(0.2046 0 0 / 4%)', 'transparent')},
+                0 0 0 1px ${lightDark('oklch(0.2046 0 0 / 4%)', 'oklch(1 0 0 / 10%)')}`,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
boxShadow: `0 12px 12px -7px light-dark(oklch(0.2046 0 0 / 12%), transparent),
0 24px 24px -10px light-dark(oklch(0.2046 0 0 / 4%), transparent),
0 0 0 1px light-dark(oklch(0.2046 0 0 / 4%), oklch(1 0 0 / 10%))`,
import { lightDark } from '../../../utils/lightDark';
boxShadow: `0 12px 12px -7px ${lightDark('oklch(0.2046 0 0 / 12%)', 'transparent')},
0 24px 24px -10px ${lightDark('oklch(0.2046 0 0 / 4%)', 'transparent')},
0 0 0 1px ${lightDark('oklch(0.2046 0 0 / 4%)', 'oklch(1 0 0 / 10%)')}`,
🤖 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 `@packages/ui/src/mosaic/components/menu/menu.styles.ts` around lines 20 - 22,
Update the boxShadow declaration in the menu styles to use the repository’s
lightDark utility for each light/dark color pair instead of raw CSS light-dark()
calls, preserving the existing colors and fallback behavior.

Source: Coding guidelines

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-12T13:01:31.317Z

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 d9700e7.

@alexcarpenter
alexcarpenter merged commit 8320d28 into main Aug 12, 2026
86 of 87 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-menu-dark-mode-outline branch August 12, 2026 14:06
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.

2 participants