forked from Modernizr/Modernizr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for :focus-visible and fix wrong references in :focus-within (…
…Modernizr#2665) * Create focusvisible.js * Fix wrong reference to CSS focus-within feature * Fix wrong reference for CSS focus-within feature * Add css-focus-visible to caniuse integration tests * Include focusvisible in config-all.json * Add authors tag to focusvisible.js
- Loading branch information
1 parent
049b6ca
commit a8a24bf
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*! | ||
{ | ||
"name": "CSS :focus-visible pseudo-selector", | ||
"caniuse": "css-focus-visible", | ||
"property": "focusvisible", | ||
"authors": ["@esaborit4code"], | ||
"tags": ["css"] | ||
} | ||
!*/ | ||
define(['Modernizr'], function(Modernizr) { | ||
Modernizr.addTest('focusvisible', function() { | ||
try { | ||
document.querySelector(':focus-visible'); | ||
} catch (error) { | ||
return false; | ||
} | ||
return true; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters