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
feat(drag-drop): adds light/dark mode colors #1805
Conversation
Waiting for new disabled color variables from #1806 |
9cbbb33
to
18df789
Compare
@@ -216,6 +218,10 @@ export const DraggableListItem = ({ | |||
); | |||
}; | |||
|
|||
const StyledTitle = styled.strong` | |||
color: ${p => getColor({ variable: 'foreground.default', theme: p.theme })}; |
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.
[nit] Garden never uses bold; should probably be styled with font-weight: ${p => p.theme.fontWeights.semibold};
. Also, take care re: semantics of <strong>
(add importance to) vs <b>
(bring attention to).
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.
I also just realized I can convert the former p
to a more semantically correct h2
, and leave the JSX alone.
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.
[nit] the h2
still has the bold font weight problem. Would it be better to use Garden's <LG tag="h2">
typography component? We just don't want to confuse any consumers that view the pattern.
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.
Yeah that makes sense. I'll update.
packages/drag-drop/src/styled/draggable-list/StyledDropIndicator.ts
Outdated
Show resolved
Hide resolved
@@ -16,15 +16,14 @@ export interface IStyledDropIndicatorProps extends ThemeProps<DefaultTheme> { | |||
|
|||
const colorStyles = (props: IStyledDropIndicatorProps) => { | |||
const { theme } = props; | |||
const backgroundColor = getColorV8('primaryHue', 600, theme); | |||
const color = getColorV8('primaryHue', 600, theme); | |||
const color = getColor({ variable: 'foreground.primary', theme }); |
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.
const color = getColor({ variable: 'foreground.primary', theme }); | |
const color = getColor({ variable: 'border.primaryEmphasis', theme }); |
I'm not seeing this in the designs, but semantically it feels a lot more like a border; conversely, I wouldn't expect this to change if the foreground was modified.
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.
That's fair. I was teetering between fg and border, anyway. :)
light: { transparency: opacity[200] }, | ||
dark: { transparency: opacity[1000] }, | ||
theme | ||
}) as 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.
Can this as string
cast be removed now?
const placeholderBgColor = getColor({ | ||
variable: 'background.emphasis', | ||
transparency: theme.opacity[100], | ||
dark: { offset: -100 }, | ||
theme | ||
}); |
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.
const placeholderBgColor = getColor({ | |
variable: 'background.emphasis', | |
transparency: theme.opacity[100], | |
dark: { offset: -100 }, | |
theme | |
}); | |
const placeholderBgColor = getColor({ variable: 'background.disabled', theme }); |
I think this can be simplified now.
}); | ||
const disabledBgColor = getColor({ | ||
variable: 'background.disabled', | ||
transparency: theme.opacity[100], |
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.
Not needed as transparency
is already included with the rgba for background.disabled
.
color = getColorV8('neutralHue', 400, theme); | ||
backgroundColor = getColor({ | ||
variable: 'background.disabled', | ||
transparency: theme.opacity[100], |
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.
Can remove transparency
β already built-in
this is so awesomes, thanks @geotrev. visually looks good to me! |
Co-authored-by: Jonathan Zempel <jzempel@gmail.com>
β¦ review changes
d7391ee
to
49c25e5
Compare
516beda
to
2fda125
Compare
Description
Colors updated for the following components & stories using new v9 color palette:
Checklist
npm start
)β¬ οΈ renders as expected with reversed (RTL) directionπ€ renders as expected with Bedrock CSS (?bedrock
)π tested in Chrome, Firefox, Safari, and Edge