Skip to content

feat(mosaic): split control and container borders and use washes for states - #10496

Draft
prestonwebdev wants to merge 1 commit into
mainfrom
prestonwebdev/mosaic-color-adoption
Draft

prestonwebdev wants to merge 1 commit into
mainfrom
prestonwebdev/mosaic-color-adoption

Conversation

@prestonwebdev

Copy link
Copy Markdown
Member

Description

Moves Mosaic components onto the new border and tint tokens.

  • Controls (inputs, selects, tag input, checkbox, radio, outline buttons) keep the stronger --cl-color-border. Containers and dividers (cards, sections, tables, menus, the profile nav) use --cl-color-border-subtle.
  • Outline buttons fill with the surface and lay their hover and pressed tint over it as an inset wash, so the tint works on the page, the surface or a faded fill and still transitions.
  • Banners, badges, toasts and the tag-input error use the -subtle and -border tokens, and the neutral badge and banner use --cl-color-neutral-subtle.
  • The light-mode negative color is slightly deeper for contrast.

Stacked on #10493.

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: styling

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 29, 2026 10:27pm UTC
swingset Ready Ready Preview Oct 29, 2026 10:27pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 39fa9d9

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

This PR includes changesets to release 2 packages
Name Type
@clerk/mosaic Patch
@clerk/swingset 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

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

…states

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10496

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10496

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 39fa9d9

const neutralHoverWash = `inset 0 0 0 100vmax ${colorVars['--cl-color-neutral-alpha-100']}`;
const neutralPressedWash = `inset 0 0 0 100vmax ${colorVars['--cl-color-neutral-alpha-200']}`;
const negativeHoverWash = `inset 0 0 0 100vmax ${colorVars['--cl-color-negative-alpha-200']}`;
const negativePressedWash = `inset 0 0 0 100vmax ${colorVars['--cl-color-negative-alpha-300']}`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hmm, not sure we want to be doing this for a hover effect. any strong reason not to use color mix to achieve this hover state?


import { colorVars, radiusVars, space } from '../../tokens.stylex';

const filledWash = `light-dark(color-mix(in oklab, ${colorVars['--cl-color-neutral']} 3.5%, transparent), color-mix(in oklab, ${colorVars['--cl-color-neutral']} 4.5%, transparent))`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

was hopeful to reduce spreading different opacity usages like this through the implementations. was pat of the goal of the alphas. non-blocking if we think we need this custom here though.

This branch was successfully deployed

2 active deployments
Preview – swingset — 39fa9d93 Deployed Oct 29, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 39fa9d93 Deployed Oct 29, 2026 by vercel[bot]
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