Skip to content

Commit a409bdb

Browse files
committed
fix: outline across platforms
1 parent a53f43f commit a409bdb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/styles/addOutlineWidth/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* can be added to the object
44
*/
55

6+
import themeDefault from '../themes/default';
7+
68
/**
79
* Adds the addOutlineWidth property to an object to be used when styling
810
*
@@ -14,6 +16,7 @@ function withOutlineWidth(obj, val) {
1416
return {
1517
...obj,
1618
outlineWidth: val,
19+
boxShadow: `0px 0px 0px ${val}px ${themeDefault.borderFocus}`,
1720
};
1821
}
1922

web/index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@
3232
-webkit-user-select: none !important;
3333
-webkit-touch-callout: none !important;
3434
}
35-
*:focus, *:focus-visible, [data-focusvisible-polyfill] {
36-
outline: 1px solid #0185ff;
35+
:focus-visible {
36+
outline: 0;
37+
box-shadow: 0px 0px 0px 1px #0185ff;
38+
}
39+
:focus[data-focusvisible-polyfill] {
40+
outline: 0;
41+
box-shadow: 0px 0px 0px 1px #0185ff;
3742
}
3843
</style>
3944
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">

0 commit comments

Comments
 (0)