Skip to content

Commit 6e1823e

Browse files
committed
[EuiDraggable] Convert broken focus styles
`euiFocusRing` mixin doesn't work because of `:focus-visible` prefer just an auto outline to match prod behavior, the outline is just more focused on the child item not sure what the custom drag handle CSS is for, drag handle focus outlines work fine as-is
1 parent 03341cc commit 6e1823e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
.euiDraggable {
2-
&:focus > .euiDraggable__item,
3-
&.euiDraggable--hasCustomDragHandle > .euiDraggable__item [data-react-beautiful-dnd-drag-handle]:focus {
4-
@include euiFocusRing;
5-
}
6-
}

src/components/drag_and_drop/draggable.styles.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ export const euiDraggableStyles = (euiThemeContext: UseEuiTheme) => {
1616

1717
return {
1818
euiDraggable: css`
19+
&:focus {
20+
outline: none;
21+
22+
& > .euiDraggable__item {
23+
outline: auto;
24+
}
25+
}
26+
1927
/* !importants in this file override inline styles on JS-inserted HTML elements */
2028
/* stylelint-disable declaration-no-important */
2129
`,

0 commit comments

Comments
 (0)