tangled
alpha
login
or
join now
trnck.dev
/
blog
0
fork
atom
blog.trnck.dev
0
fork
atom
overview
issues
pulls
pipelines
Add `<code>` and `<kbd>` styles
Filip Troníček
2 years ago
f6920d20
0cdd1bfa
+51
2 changed files
expand all
collapse all
unified
split
_sass
_article.scss
assets
styles.scss
+50
_sass/_article.scss
···
1
1
+
:root {
2
2
+
color-scheme: light dark;
3
3
+
}
4
4
+
5
5
+
code {
6
6
+
margin-bottom: 1px;
7
7
+
padding: 2px 0.25em 1px;
8
8
+
border-radius: 0.2em;
9
9
+
line-height: 1.25em;
10
10
+
background-color: light-dark(rgba(8, 43, 120, 0.047), rgba(255, 255, 255, 0.075));
11
11
+
border: 0.5px solid light-dark(rgb(212, 212, 212), rgb(44, 46, 51));
12
12
+
}
13
13
+
14
14
+
p code {
15
15
+
font-size: 90%;
16
16
+
white-space: nowrap;
17
17
+
}
18
18
+
19
19
+
pre code {
20
20
+
display: block;
21
21
+
padding: 15px;
22
22
+
background-color: #2d2d2d;
23
23
+
color: #f8f8f2;
24
24
+
border-radius: 5px;
25
25
+
overflow-x: auto;
26
26
+
}
27
27
+
28
28
+
pre code::before {
29
29
+
content: " ";
30
30
+
display: block;
31
31
+
height: 1rem;
32
32
+
}
33
33
+
34
34
+
pre code::after {
35
35
+
content: " ";
36
36
+
display: block;
37
37
+
height: 1rem;
38
38
+
}
39
39
+
40
40
+
kbd {
41
41
+
display: inline-block;
42
42
+
padding: 3px 5px;
43
43
+
font-size: 90%;
44
44
+
color: light-dark(#333, #ddd);
45
45
+
background-color: light-dark(#f7f7f7, #444);
46
46
+
border: 1px solid light-dark(#ccc, #555);
47
47
+
border-radius: 3px;
48
48
+
box-shadow: inset 0 -1px 0 light-dark(#bbb, #666);
49
49
+
line-height: 1.4;
50
50
+
}
+1
assets/styles.scss
···
3
3
4
4
@import url("https://unpkg.com/primer/build/build.css");
5
5
@import "highlight-syntax";
6
6
+
@import "article";
6
7
7
8
:root {
8
9
--border-radius: 5px;