-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(Color): Update shadow tokens' names and values #3036
Conversation
View your CI Pipeline Execution ↗ for commit e64de76. ☁️ Nx Cloud last updated this comment at |
@@ -129,7 +129,7 @@ export const coreTheme = createTheme({ | |||
}, | |||
}, | |||
}) | |||
.addScale('borders', ({ colors }) => ({ | |||
.addScale('borders', ({ colors }: { colors: Record<string, string> }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ok? TS was complaining that colors
was implicitly typed as any
(and this is what Copilot suggested) .
@@ -28,20 +28,20 @@ const DynamicCardWrapper = styled(Box)<CardWrapperProps>( | |||
prop: 'shadow', | |||
base: { | |||
position: 'relative', | |||
boxShadow: `0px 0px 0 currentColor`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if it's actually better to remove this altogether?
it seems like values for no shadow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aere we sure shadow actually get overwritten when this value is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double checked on local + preview by removing the code and I don't see any visible difference for shadow
@@ -54,20 +54,20 @@ const shadowVariants = (mode: ColorModes) => | |||
prop: 'shadow', | |||
base: { | |||
position: 'relative', | |||
boxShadow: `0px 0px 0 currentColor`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thought here on removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it, looks greata!
📬Published Alpha Packages:@codecademy/[email protected] |
🚀 Styleguide deploy preview ready! |
Overview
Updating the names of shadow tokens (colors that use
shadow-*
) and updating components that have been usingshadow-*
tokens incorrectly, i.e. not semantically correct, like setting a background toshadow-solid
instead ofbackground-contrast
.Note:
PR Checklist
Testing Instructions
For Gamut:
?path=/docs/foundations-colormode--docs
to see thatshadow-solid
is nowshadow-primary
andshadow-opaque
is nowshadow-secondary
.polyline
should be roughly the same.PR Links and Envs