File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,11 @@ const Item: React.FC<TreeViewItemProps> = ({
216216 borderRadius : 2 ,
217217 cursor : 'pointer' ,
218218 '&:hover' : {
219- backgroundColor : 'actionListItem.default.hoverBg'
219+ backgroundColor : 'actionListItem.default.hoverBg' ,
220+ '@media (forced-colors: active)' : {
221+ outline : '2px solid transparent' ,
222+ outlineOffset : - 2
223+ }
220224 } ,
221225 '@media (pointer: coarse)' : {
222226 '--toggle-width' : '1.5rem' , // 24px
@@ -228,7 +232,10 @@ const Item: React.FC<TreeViewItemProps> = ({
228232 // Reference issue: https://github.com/styled-components/styled-components/issues/3265
229233 [ `[role=tree][aria-activedescendant="${ itemId } "]:focus-visible #${ itemId } > &:is(div)` ] : {
230234 boxShadow : ( theme : Theme ) => `inset 0 0 0 2px ${ theme . colors . accent . emphasis } ` ,
231- outline : '2px solid transparent'
235+ '@media (forced-colors: active)' : {
236+ outline : '2px solid SelectedItem' ,
237+ outlineOffset : - 2
238+ }
232239 } ,
233240 '[role=treeitem][aria-current=true] > &:is(div)' : {
234241 bg : 'actionListItem.default.selectedBg' ,
You can’t perform that action at this time.
0 commit comments