-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: Deprecate COLORS.white
#67649
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,11 +134,11 @@ export const ItemBaseUI = styled.li` | |
|
||
&.is-active { | ||
background-color: ${ COLORS.theme.accent }; | ||
color: ${ COLORS.white }; | ||
color: ${ COLORS.theme.accentInverted }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
> button, | ||
> a { | ||
color: ${ COLORS.white }; | ||
color: ${ COLORS.theme.accentInverted }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still works well, but hover color still doesn't work well: Should be fixable with something like: diff --git a/packages/components/src/navigation/styles/navigation-styles.tsx b/packages/components/src/navigation/styles/navigation-styles.tsx
index 0cde6314685..8894065f66f 100644
--- a/packages/components/src/navigation/styles/navigation-styles.tsx
+++ b/packages/components/src/navigation/styles/navigation-styles.tsx
@@ -137,6 +137,7 @@ export const ItemBaseUI = styled.li`
color: ${ COLORS.theme.accentInverted };
> button,
+ > .components-button:hover,
> a {
color: ${ COLORS.theme.accentInverted };
opacity: 1; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to be working well, here's a PR: #67732 |
||
opacity: 1; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ export const buttonView = ( { | |
background: transparent; | ||
border: none; | ||
border-radius: ${ CONFIG.radiusXSmall }; | ||
color: ${ COLORS.gray[ 700 ] }; | ||
color: ${ COLORS.theme.gray[ 700 ] }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
fill: currentColor; | ||
cursor: pointer; | ||
display: flex; | ||
|
@@ -70,7 +70,7 @@ export const buttonView = ( { | |
} | ||
|
||
&:active { | ||
background: ${ CONFIG.controlBackgroundColor }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this |
||
background: ${ COLORS.ui.background }; | ||
} | ||
|
||
${ isDeselectable && deselectable } | ||
|
@@ -79,19 +79,19 @@ export const buttonView = ( { | |
`; | ||
|
||
const pressed = css` | ||
color: ${ COLORS.white }; | ||
color: ${ COLORS.theme.foregroundInverted }; | ||
|
||
&:active { | ||
background: transparent; | ||
} | ||
`; | ||
|
||
const deselectable = css` | ||
color: ${ COLORS.gray[ 900 ] }; | ||
color: ${ COLORS.theme.foreground }; | ||
|
||
&:focus { | ||
box-shadow: | ||
inset 0 0 0 1px ${ COLORS.white }, | ||
inset 0 0 0 1px ${ COLORS.ui.background }, | ||
0 0 0 ${ CONFIG.borderWidthFocus } ${ COLORS.theme.accent }; | ||
outline: 2px solid transparent; | ||
} | ||
|
@@ -112,7 +112,7 @@ const isIconStyles = ( { | |
}; | ||
|
||
return css` | ||
color: ${ COLORS.gray[ 900 ] }; | ||
color: ${ COLORS.theme.foreground }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
height: ${ iconButtonSizes[ size ] }; | ||
aspect-ratio: 1; | ||
padding-left: 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ export const toggleGroupControl = ( { | |
content: ''; | ||
position: absolute; | ||
pointer-events: none; | ||
background: ${ COLORS.gray[ 900 ] }; | ||
background: ${ COLORS.theme.foreground }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
// Windows High Contrast mode will show this outline, but not the box-shadow. | ||
outline: 2px solid transparent; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ const CONTROL_PROPS = { | |
controlPaddingXSmall: 8, | ||
controlPaddingXLarge: 12 * 1.3334, // TODO: Deprecate | ||
|
||
controlBackgroundColor: COLORS.white, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
controlBoxShadowFocus: `0 0 0 0.5px ${ COLORS.theme.accent }`, | ||
controlHeight: CONTROL_HEIGHT, | ||
controlHeightXSmall: `calc( ${ CONTROL_HEIGHT } * 0.6 )`, | ||
|
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 confirm this is unchanged when comparing to trunk. Hopefully we'll be able to make it themable soonish!