Skip to content

feat!: move shadow token definitions to repo - #3302

Merged
colepeters merged 3 commits into
v5-alphafrom
sdk-2978/shadow-colours
Nov 6, 2026
Merged

colepeters merged 3 commits into
v5-alphafrom
sdk-2978/shadow-colours

Conversation

@colepeters

@colepeters colepeters commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Description

In order to support light-dark versions of our shadow tokens, the tokens are now defined with the UI repo, rather than as DTCG-spec tokens in the tokens studio (as the DTCG spec doesn't have great support for light-dark values, particularly for shadows). The size/length measurements are unchanged, having been inlined from the original token definitions; the colour values now use light-dark and the new shadow colour tokens.

The token values are updated as per the values Lauren logged in the Linear ticket.

What to review

Do the changes look correct?

Testing

Verified appearance in Storybook.


Note

Medium Risk
Touches global shadow styling and theme colours for all elevations; regressions would be visible but limited to presentation, not data or security.

Overview
Shadow tokens now live in the UI package instead of DTCG tokens from Tokens Studio, so each shadow layer can use light-dark() for outline/umbra/penumbra/ambient colors while keeping the same offsets as before.

The new values follow the Linear spec (SDK-2978) so shadows no longer invert incorrectly in dark mode. @sanity-labs/design-tokens is bumped to 0.0.2-alpha.10 with lockfile and minimumReleaseAgeExclude aligned; a patch changeset notes the release.

Review focus: confirm shadow steps 0–5 and utility classes (sui-shadow*) still match product intent in Storybook/light-dark.

Reviewed by Cursor Bugbot for commit f6a113f. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

4 Skipped Deployments
Project Deployment Actions Updated
sanity-ui-storybook Ignored Ignored Nov 6, 2026 4:40pm UTC
sanity-ui-workshop Ignored Ignored Nov 6, 2026 4:40pm UTC
ui-docs Ignored Ignored Nov 6, 2026 4:40pm UTC
ui-studio Ignored Ignored Nov 6, 2026 4:40pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f6a113f

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

This PR includes changesets to release 1 package
Name Type
@sanity/ui 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

@socket-security

socket-security Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​sanity-labs/​design-tokens@​0.0.2-alpha.9 ⏵ 0.0.2-alpha.101001008698100

View full report

.sui-shadow4 { box-shadow: var(--shadow-4); }
.sui-shadow5 { box-shadow: var(--shadow-5); }
:root {
--card-shadow-outline-color: light-dark(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it make sense to remove the card here since we allow shadows on other components as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh gosh, I thought I did, apparently my copy paste skills were waning. Thank you!

@laurenashpole laurenashpole left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@colepeters
colepeters merged commit 5002265 into v5-alpha Nov 6, 2026
15 of 16 checks passed
@colepeters
colepeters deleted the sdk-2978/shadow-colours branch November 6, 2026 16:44
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