Skip to content

Commit

Permalink
feat(focus-visible): raw implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed May 27, 2020
1 parent 78f77af commit 64ad4b6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import ScrollSpy from './src/scrollspy'
import Tab from './src/tab'
import Toast from './src/toast'
import Tooltip from './src/tooltip'
import '../node_modules/focus-visible/dist/focus-visible.js' // Boosted mod

export {
Alert,
Expand Down
1 change: 1 addition & 0 deletions js/index.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import ScrollSpy from './src/scrollspy'
import Tab from './src/tab'
import Toast from './src/toast'
import Tooltip from './src/tooltip'
import '../node_modules/focus-visible/dist/focus-visible.js' // Boosted mod

export default {
Alert,
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-unicorn": "^20.0.0",
"find-unused-sass-variables": "^2.0.0",
"focus-visible": "^5.1.0",
"glob": "^7.1.6",
"hammer-simulator": "0.0.1",
"hugo-bin": "^0.59.0",
Expand Down
9 changes: 9 additions & 0 deletions scss/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ body {
outline: 0 !important;
}

// Boosted mod
// Using the :focus-visible polyfill to hide outline defensively
// See https://github.com/WICG/focus-visible
.js-focus-visible :focus:not([data-focus-visible-added]),
.js-focus-visible .focus:not([data-focus-visible-added]) {
outline: 0 !important;
}
// End mod


// Content grouping
//
Expand Down

0 comments on commit 64ad4b6

Please sign in to comment.