feat(dual-list-selector): add high-contrast - #7686
Conversation
|
Preview: https://pf-pr-7686.surge.sh A11y report: https://pf-pr-7686-a11y.surge.sh |
| --#{$dual-list-selector}__list-item-row--m-selected--BorderWidth: var(--pf-t--global--border--width--strong); | ||
| --#{$dual-list-selector}__list-item-row--m-selected--BorderColor: var(--pf-t--global--border--color--high-contrast); |
There was a problem hiding this comment.
Not sure you need this if it's already defined?
| --#{$dual-list-selector}__list-item-row--m-selected--BorderWidth: var(--pf-t--global--border--width--strong); | |
| --#{$dual-list-selector}__list-item-row--m-selected--BorderColor: var(--pf-t--global--border--color--high-contrast); | |
| --#{$dual-list-selector}__list-item-row--m-selected--BorderWidth: var(--pf-t--global--border--width--strong); |
| --#{$dual-list-selector}__list-item-row--BorderWidth: var(--pf-t--global--border--width--regular); | ||
| --#{$dual-list-selector}__list-item-row--BorderColor: transparent; |
There was a problem hiding this comment.
Can we update this so the border-width is what enables the border?
| --#{$dual-list-selector}__list-item-row--BorderWidth: var(--pf-t--global--border--width--regular); | |
| --#{$dual-list-selector}__list-item-row--BorderColor: transparent; | |
| --#{$dual-list-selector}__list-item-row--BorderWidth: 0; | |
| --#{$dual-list-selector}__list-item-row--BorderColor: var(--pf-t--global--border--color--high-contrast); |
| --#{$dual-list-selector}__list-item-row--BorderWidth: var(--pf-t--global--border--width--regular); | ||
| --#{$dual-list-selector}__list-item-row--BorderColor: transparent; | ||
| --#{$dual-list-selector}__list-item-row--hover--BackgroundColor: var(--pf-t--global--background--color--primary--hover); | ||
| --#{$dual-list-selector}__list-item-row--hover--BorderColor: var(--pf-t--global--border--color--high-contrast); |
There was a problem hiding this comment.
| --#{$dual-list-selector}__list-item-row--hover--BorderColor: var(--pf-t--global--border--color--high-contrast); | |
| --#{$dual-list-selector}__list-item-row--hover--BorderWidth: var(--pf-t--global--border--width--regular); |
| &:focus { | ||
| &:focus-visible { | ||
| --#{$dual-list-selector}__list-item-row--BackgroundColor: var(--#{$dual-list-selector}__list-item-row--hover--BackgroundColor); | ||
| --#{$dual-list-selector}__list-item-row--BorderColor: var(--#{$dual-list-selector}__list-item-row--BorderColor); |
There was a problem hiding this comment.
Just keeping you on your toes.
6a24bfb to
01757e1
Compare
mcoker
left a comment
There was a problem hiding this comment.
Just a few places we can use the action--plain border tokens.
1299fca to
691ed46
Compare
|
Looks like this branch may have been branched from the first commit in https://github.com/srambach/patternfly/tree/7616-drawer-hi-c for #7683. Rebased and dropped the 1st and 4th commits below since they were drawer changes. After the rebase, it exposed that we were including empty "count" badges in all items, so put those in a conditional. |
|
@srambach do you mind giving this a once over and make sure it looks like you expect? |


Fixes #7617
Figma design: https://www.figma.com/design/wKcOq7IrzfL1gEK2mocd6r/Semantic-dimension-border-width----font-weight-adjustment-test?node-id=10994-57326&t=r888cXH4fIPuJcgE-4
Top/bottom 1px border on hover (along with background change)
Top/bottom 2px border for selected items UNLESS there's a checkbox
Moves outline on the container out 2px so that the focus outline is not covered by the item's background. Question - use a spacer here or hard-coded pixels? It's not really a logical number.
Changes :focus to :focus-visible because the current implementation leaves a background hanging around if you click something to UNselect it and then move the mouse away.
Note: the border width of list items changes when selected, so we still need to use the pseudoelement
Assisted by Cursor autocomplete