Repository navigation
fix: update card borderRadius and related tests - #3441
Merged
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit e4aafbf ☁️ Nx Cloud last updated this comment at |
|
Collaborator
|
📬 Published Alpha Packages:
|
Contributor
|
🚀 Styleguide deploy preview ready! Preview URL: https://6acd3b9fe6426a970f5fd51a--gamut-preview.netlify.app |
LinKCoding
marked this pull request as ready for review
October 12, 2026 20:24
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
Card hover animations now use the border radius of the active theme, so switching themes updates the radius instead of keeping the previously computed one.
useCardElevation(packages/gamut/src/Card/styles.tsx) readsborderRadiifromuseTheme()instead of receiving a radius already resolved from the static core scale in@codecademy/gamut-styles.borderRadiustoken. It resolves string values through the theme's scale and passes through any other string. Responsive or function values resolve toundefined, because framer-motion needs a concrete value to animate.Card(packages/gamut/src/Card/index.tsx) passes the token to the hook and drops its own static lookup and theborderRadiiimport.Card.test.tsxnow checks thatborderRadiusresolves from the active theme forcoreTheme,percipioThemeandlxStudioTheme.PR Checklist
Testing Instructions
Don't make me tap the sign.
mdis4px).mdis8px).borderRadiustoken (e.g.lg,xl) on an interactive Card and repeat the theme switch. Check that the radius updates each time.patternLeft,patternRightandoutlineshadow variants on hover. The radius should stay correct while the shadow animates.PR Links and Envs