Skip to content

Commit 4cb4e2d

Browse files
authored
Merge pull request #385 from BeAPI/feature/focus-visible
feat (focus-visible): remove what-intent and use focus-visible
2 parents 79c10af + bd2dca3 commit 4cb4e2d

File tree

5 files changed

+2
-44
lines changed

5 files changed

+2
-44
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"dependencies": {
2020
"@fontsource/poppins": "^5.0.5",
2121
"lazysizes": "^5.3.2",
22-
"oneloop.js": "^5.0.0",
23-
"what-input": "^5.2.10"
22+
"oneloop.js": "^5.0.0"
2423
},
2524
"devDependencies": {
2625
"@wordpress/blocks": "^11.16.0",

src/js/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import lazySizes from 'lazysizes'
22
import 'lazysizes/plugins/native-loading/ls.native-loading'
33
import 'lazysizes/plugins/object-fit/ls.object-fit'
44
import 'lazysizes/plugins/print/ls.print'
5-
import 'what-input'
65
import './classes/ScrollDirection'
76
import './classes/ButtonSeoClick'
87
import './classes/Header'

src/scss/04-utilities/_focus.scss

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,9 @@ html {
55
select,
66
textarea,
77
[tabindex] {
8-
&:focus {
8+
&:focus-visible {
99
outline: 2px solid currentColor;
1010
outline-offset: .5rem;
1111
}
1212
}
13-
14-
&:not([data-whatintent="keyboard"]) {
15-
a,
16-
button,
17-
input,
18-
select,
19-
textarea,
20-
[tabindex] {
21-
&:focus {
22-
outline: none;
23-
}
24-
}
25-
}
26-
}
27-
28-
%focus-seo-container {
29-
&:focus-within {
30-
outline: 2px solid currentColor;
31-
outline-offset: .5rem;
32-
}
33-
34-
*:focus {
35-
outline: none;
36-
}
37-
38-
html:not([data-whatintent="keyboard"]) & {
39-
&:focus-within,
40-
*:focus {
41-
outline: none;
42-
}
43-
}
4413
}

src/scss/04-utilities/_seo.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
%seo-container {
2-
@extend %focus-seo-container;
32
position: relative;
43
z-index: 1;
54
cursor: pointer;

yarn.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3227,7 +3227,6 @@ __metadata:
32273227
webpack-manifest-plugin: 5.0.0
32283228
webpack-merge: ^5.7.3
32293229
webpackbar: ^5.0.0-3
3230-
what-input: ^5.2.10
32313230
languageName: unknown
32323231
linkType: soft
32333232

@@ -12758,13 +12757,6 @@ __metadata:
1275812757
languageName: node
1275912758
linkType: hard
1276012759

12761-
"what-input@npm:^5.2.10":
12762-
version: 5.2.12
12763-
resolution: "what-input@npm:5.2.12"
12764-
checksum: 05edbb24c8a5a3711cec647cdc36686924e13829b63d8b5ca46a95be9eb0663b767b1b1e229b7b0707a63bffe5fb5225935aaf098db56ebe1f7728ed792988a1
12765-
languageName: node
12766-
linkType: hard
12767-
1276812760
"which-module@npm:^2.0.0":
1276912761
version: 2.0.0
1277012762
resolution: "which-module@npm:2.0.0"

0 commit comments

Comments
 (0)