Skip to content

Commit 4bcad41

Browse files
committed
feat: focus ring style
1 parent b4b4601 commit 4bcad41

File tree

6 files changed

+19
-13
lines changed

6 files changed

+19
-13
lines changed

assets/script/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import cssHasPseudo from "css-has-pseudo/browser";
2+
3+
cssHasPseudo(document);
4+
15
(() => {
26
if (document.getElementsByClassName("twitter-tweet").length === 0) return;
37
if (!window.twttr) {

assets/style/_base.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
letter-spacing: 0.0125rem;
77
}
88

9-
:focus {
9+
:focus-visible {
1010
outline: 2px solid var(--color-anchor);
1111
outline-offset: 1px;
1212
}
@@ -57,4 +57,8 @@ a {
5757
&:visited {
5858
color: var(--color-anchor-visited);
5959
}
60+
61+
&:has(> img) {
62+
display: inline-flex;
63+
}
6064
}

assets/style/components/_article-tab.css

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.article-tab {
2+
margin: -2px;
3+
padding: 2px;
4+
25
ul {
36
display: flex;
47
justify-content: center;

assets/style/components/_social-button.css

-7
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,4 @@
2222
background-color: #00a4de;
2323
}
2424
}
25-
26-
img {
27-
display: inline-block;
28-
height: 0.75rem;
29-
padding-right: 0.25rem;
30-
vertical-align: bottom;
31-
}
3225
}

package.hugo.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
"version": "3.1.3",
44
"author": "knokmki612 <[email protected]>",
55
"dependencies": {
6-
"autoprefixer": "10.4.0",
6+
"autoprefixer": "10.4.5",
7+
"css-has-pseudo": "3.0.4",
78
"modern-normalize": "1.1.0",
8-
"postcss": "8.3.11",
9-
"postcss-cli": "9.0.2",
10-
"postcss-csso": "5.0.1",
11-
"postcss-import": "14.0.2",
9+
"postcss": "8.4.12",
10+
"postcss-cli": "9.1.0",
11+
"postcss-csso": "6.0.0",
12+
"postcss-import": "14.1.0",
1213
"postcss-nested": "5.0.6"
1314
}
1415
}

postcss.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = () => ({
77
path: [join(__dirname, "assets", "style")]
88
},
99
'postcss-nested': {},
10+
'css-has-pseudo': {},
1011
autoprefixer: {},
1112
'postcss-csso': {},
1213
}

0 commit comments

Comments
 (0)