feat: Elevation tokens scale for core and percipio themes - #3410
Open
LinKCoding wants to merge 16 commits into
Open
feat: Elevation tokens scale for core and percipio themes#3410LinKCoding wants to merge 16 commits into
LinKCoding wants to merge 16 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit f27e4dd ☁️ Nx Cloud last updated this comment at |
|
LinKCoding
force-pushed
the
kl-gmt-1704-gamut-elevation-tokens
branch
from
August 18, 2026 14:25
e4f4c07 to
e9d9aa3
Compare
LinKCoding
marked this pull request as ready for review
August 19, 2026 14:50
Collaborator
|
📬 Published Alpha Packages:
|
Contributor
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a8729c40bc6d8f030fa6b7a--gamut-preview.netlify.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds a themeable
elevationscale to the Gamut themes so surfaces likeCardget their hover shadow and lift from the active theme instead of hardcoded Core values.packages/gamut-styles/src/variables/elevation.tswithcoreElevationandpercipioElevationscale factories, plus exportedElevationScale/ElevationState/ElevationStateStyles/ElevationScaleFactorytypes. Factories receive the theme'scolorsvia.addScale('elevation', ...), socolors['shadow-primary']resolves per theme and color mode without circular theme imports.coreThemeandpercipioTheme; each scale definesrest,hover, andhoverMirroredstates withshadowandtransformtokens (flattened to dashcase keys likeelevation['hover-shadow']). The shared return type guarantees every theme emits the same tokens.translatelift.Card'shoverShadowLeft/hoverShadowRightstyle factories with auseCardElevationhook that reads the elevation tokens fromuseTheme(), regrouped into framer-motion variants via agetElevationStyleshelper. Outline shadow variants keep their bespoke two-layer shadow but share the scale's transforms.CoreTheme.mdxandPercipioTheme.mdx, backed by a sharedcreateElevationTablethat renders one row per state with paths, values, and a live shadow/lift example (dashed outline marks the resting position).PR Checklist
Testing Instructions
rest,hover, andhoverMirroredrows with shadow/transform paths, values, and example boxes (dashed outline should hug the box with no gap at the bottom).transform: noneon every state.Cardstory withisInteractiveand hover it — the shadow and lift should match the previous behavior (patternLeft/default lifts up-right with a left shadow,patternRightmirrors it,outlinekeeps its two-layer outline shadow).PR Links and Envs