Skip to content

Commit b4ae248

Browse files
committed
feat (focus-visible): remove what-intent and use focus-visible
1 parent 79c10af commit b4ae248

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
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: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,20 @@ 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-
}
2613
}
2714

2815
%focus-seo-container {
29-
&:focus-within {
16+
&:has(:focus-visible) {
3017
outline: 2px solid currentColor;
3118
outline-offset: .5rem;
3219
}
3320

3421
*:focus {
3522
outline: none;
3623
}
37-
38-
html:not([data-whatintent="keyboard"]) & {
39-
&:focus-within,
40-
*:focus {
41-
outline: none;
42-
}
43-
}
4424
}

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)