Skip to content

Commit

Permalink
fix: outline across platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Jul 28, 2021
1 parent a53f43f commit a409bdb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/styles/addOutlineWidth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* can be added to the object
*/

import themeDefault from '../themes/default';

/**
* Adds the addOutlineWidth property to an object to be used when styling
*
Expand All @@ -14,6 +16,7 @@ function withOutlineWidth(obj, val) {
return {
...obj,
outlineWidth: val,
boxShadow: `0px 0px 0px ${val}px ${themeDefault.borderFocus}`,
};
}

Expand Down
9 changes: 7 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
-webkit-user-select: none !important;
-webkit-touch-callout: none !important;
}
*:focus, *:focus-visible, [data-focusvisible-polyfill] {
outline: 1px solid #0185ff;
:focus-visible {
outline: 0;
box-shadow: 0px 0px 0px 1px #0185ff;
}
:focus[data-focusvisible-polyfill] {
outline: 0;
box-shadow: 0px 0px 0px 1px #0185ff;
}
</style>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
Expand Down

0 comments on commit a409bdb

Please sign in to comment.