File tree Expand file tree Collapse file tree 3 files changed +16
-23
lines changed
Expand file tree Collapse file tree 3 files changed +16
-23
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,19 @@ export const AccordionDisclosureStyle = styled.div
144144 color ? colorStyleFn : `color: ${ theme . colors . ui5 } ;` }
145145 cursor: pointer;
146146 display: flex;
147- outline: 1px solid transparent;
148- outline-color: ${ ( { focusVisible, theme } ) =>
149- focusVisible && theme . colors . keyFocus } ;
150147 ${ padding }
148+ outline: none;
151149 text-align: left;
152150 width: 100%;
153- `
151+
152+ ${ ( { focusVisible, theme } ) =>
153+ focusVisible &&
154+ `
155+ &:focus {
156+ box-shadow: inset 0 0 0 2px ${ theme . colors . keyFocus } ;
157+ }
158+ ` }
159+ `
154160
155161export const AccordionDisclosure = styled ( AccordionDisclosureInternal ) . attrs (
156162 ( props ) => ( {
Original file line number Diff line number Diff line change @@ -101,26 +101,17 @@ export const ListItemWrapper = styled(ListItemWrapperInternal)`
101101 &:hover,
102102 &:focus {
103103 color: inherit;
104- position: relative;
105104 text-decoration: none;
106105 }
107106 }
108107
109- ${ ( { focusVisible, theme : { colors } } ) =>
108+ ${ ( { focusVisible, theme } ) =>
110109 focusVisible &&
111- `&:focus-within > button:after,
112- &:focus-within > a:after {
113- content: '';
114- display:block;
115- border: solid 2px ${ colors . keyFocus } ;
116- border-radius: 2px;
117- margin: 0 1px;
118- position: absolute;
119- top: 0;
120- left: 0;
121- right: 0;
122- bottom: 0;
123- }
110+ `
111+ &:focus-within > button,
112+ &:focus-within > a {
113+ box-shadow: inset 0 0 0 2px ${ theme . colors . keyFocus } ;
114+ }
124115 ` }
125116
126117 ${ Icon } {
Original file line number Diff line number Diff line change @@ -97,8 +97,4 @@ const MenuHeadingWrapper = styled.li<MenuHeadingWrapperProps>`
9797 renderBoxShadow ? `0 4px 8px -2px ${ colors . ui2 } ` : 'none' } ;
9898 position: sticky;
9999 top: -1px;
100- /* Prevents a conflict with position: relative items
101- (which have an additional stacking-context) from
102- creating a problematic rendering */
103- z-index: 2;
104100`
You can’t perform that action at this time.
0 commit comments