focus-visible
Advanced tools
Comparing version
{ | ||
"name": "focus-visible", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Polyfill for :focus-visible pseudo-selector", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"precommit": "lint-staged", | ||
"prepublishOnly": "npm run test", | ||
"test:server": "http-server . -s", | ||
"test:selenium": "wait-on http://localhost:8080 && node ./test/index.js", | ||
"test": "npm run build && cross-env NODE_ENV=ci concurrently -k --success last \"npm run test:server\" \"npm run test:selenium\"", | ||
"sauce": "npm run build && cross-env NODE_ENV=sauce concurrently -k --success last \"npm run test:server\" \"npm run test:selenium\"" | ||
"precommit": "lint-staged" | ||
}, | ||
@@ -38,3 +33,2 @@ "lint-staged": { | ||
"ajv": "^6.0.0", | ||
"chromedriver": "^2.38.2", | ||
"clear-module": "^2.1.0", | ||
@@ -41,0 +35,0 @@ "concurrently": "^4.0.0", |
@@ -1,2 +0,2 @@ | ||
[](https://travis-ci.org/WICG/focus-visible) | ||
[](https://travis-ci.org/WICG/focus-visible) | ||
@@ -22,2 +22,10 @@ Based on the proposed CSS | ||
## Support | ||
👋 `:focus-visible` is now [supported in all major browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible#browser_compatibility). | ||
 | ||
We would encourage you to use the CSS selector instead of this polyfill if you are able. We are not currently planning to make any updates or release new versions of the polyfill, but are open to discussion in GitHub issues if changes need to be made for emergencies. | ||
## Installation | ||
@@ -89,16 +97,2 @@ | ||
### Dependencies | ||
If you want to use `:focus-visible` with an older browser you'll need to include an additional polyfill for [`Element.prototype.classList`](https://caniuse.com/#feat=classlist). | ||
In accordance with the W3C's new [polyfill | ||
guidance](https://www.w3.org/2001/tag/doc/polyfills/#don-t-serve-unnecessary-polyfills), the | ||
`:focus-visible` polyfill does not bundle other polyfills. | ||
You can use a service like [Polyfill.io](https://polyfill.io) to download only the polyfills needed by the current browser. Just add the following line to the start of your page: | ||
```html | ||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Element.prototype.classList"></script> | ||
``` | ||
### Shadow DOM | ||
@@ -105,0 +99,0 @@ |
Sorry, the diff of this file is not supported yet
24
-4%115300
-0.45%196
-2.97%