-
Notifications
You must be signed in to change notification settings - Fork 202
fix(picker,infieldbutton): updates custom properties for background/border colors #3536
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
Changes from all 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
"@spectrum-css/infieldbutton": patch | ||
"@spectrum-css/stepper": patch | ||
"@spectrum-css/picker": patch | ||
--- | ||
|
||
S2 Foundations fixes | ||
|
||
- Adjusts the background-color of the infield button components within stepper to use `gray-100` as opposed to `gray-25`. | ||
- This corresponds to the background-color updates picker has for S2. | ||
- Corrects the border color for the default picker for S2 foundations, using `gray-500` (instead of `gray-800`) to align with other field/form components. | ||
- Refactors the `&.is-keyboardFocused&.is-placeholder` selector to `&.is-keyboardFocused.spectrum-Picker-label.is-placeholder` to avoid unexpectedly targeting the nested placeholder class. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
--spectrum-picker-background-color-active: var(--spectrum-gray-200); | ||
--spectrum-picker-background-color-key-focus: var(--spectrum-gray-200); | ||
|
||
--spectrum-picker-border-color-default: var(--spectrum-gray-800); | ||
--spectrum-picker-border-color-default: var(--spectrum-gray-500); | ||
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. we were using the wrong border color for the default picker. |
||
--spectrum-picker-border-color-default-open: var(--spectrum-gray-500); | ||
--spectrum-picker-border-color-hover: var(--spectrum-gray-600); | ||
--spectrum-picker-border-color-hover-open: var(--spectrum-gray-900); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,7 +170,7 @@ | |
--mod-textfield-border-color-disabled: var(--spectrum-stepper-border-color-disabled); | ||
} | ||
|
||
&:hover:not(.is-invalid, .is-disabled) { | ||
&:hover:not(.is-invalid, .is-disabled, .is-focused) { | ||
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. So to clarify, this means that we do not want the border color on the stepper to lighten (or I guess darken, in dark mode) when we hover when it's focused, right? So visually focus + hover should look the same as focus only? 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. Pretty much, yes. In the focus state, we do not want the borders (any of the borders) to be But yes- we do not want the hover border color to take over. We should see the focus-hover border color instead. |
||
--mod-infield-button-border-color: var(--mod-stepper-buttons-border-color-hover, var(--spectrum-stepper-buttons-border-color-hover)); | ||
} | ||
|
||
|
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.
These changes, along with the stepper changes, are not reflected in Figma yet. They're working on updating them, but decided to have the stepper buttons' background color match the s2 picker background color.