File tree Expand file tree Collapse file tree 11 files changed +55
-23
lines changed Expand file tree Collapse file tree 11 files changed +55
-23
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const config = {
7
7
codepoints : require ( './images/icons/template/mapping.json' ) ,
8
8
inputDir : './images/icons' ,
9
9
outputDir : './dist' ,
10
+ fontsUrl : '#{root}/dist' ,
10
11
// @ts -ignore
11
12
fontTypes : [ 'woff2' ] ,
12
13
normalize : true ,
Original file line number Diff line number Diff line change 1
- @font-face {
2
- font-family: '{{ name }} ';
3
- font-display: block;
4
- src: {{{ fontSrc }}} ;
5
- }
1
+ /*
2
+
3
+ Must be placed at the end of body in the HTML file of any webview that needs it (because of CSP)
4
+
5
+ <style nonce =" #{cspNonce}" >
6
+ @font-face {
7
+ font-family : ' {{ name }}' ;
8
+ font-display : block ;
9
+ src : {{{ fontSrc }}};
10
+ }
11
+ </style >
12
+ */
6
13
7
14
.glicon {
8
15
font: normal normal normal 16px/1 {{ name }} ;
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ <h2>Best practice</h2>
66
66
href ="# "
67
67
data-action ="commit-actions "
68
68
data-action-type ="graph "
69
- aria-label ="Show Commit on Commit Graph "
70
- title ="Show Commit on Commit Graph "
69
+ aria-label ="Show in Commit Graph "
70
+ title ="Show in Commit Graph "
71
71
> < code-icon icon ="graph "> </ code-icon
72
72
> </ a >
73
73
< a
@@ -133,7 +133,15 @@ <h2>Best practice</h2>
133
133
< style nonce ="#{cspNonce} ">
134
134
@font-face {
135
135
font-family : 'codicon' ;
136
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
136
+ font-display : block;
137
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
138
+ }
139
+ </ style >
140
+ < style nonce ="#{cspNonce} ">
141
+ @font-face {
142
+ font-family : 'glicons' ;
143
+ font-display : block;
144
+ src : url ("#{root}/dist/glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1" ) format ("woff2" );
137
145
}
138
146
</ style >
139
147
</ body >
Original file line number Diff line number Diff line change 19
19
< style nonce ="#{cspNonce} ">
20
20
@font-face {
21
21
font-family : 'codicon' ;
22
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
22
+ font-display : block;
23
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
23
24
}
24
25
</ style >
25
26
</ body >
Original file line number Diff line number Diff line change 12
12
< style nonce ="#{cspNonce} ">
13
13
@font-face {
14
14
font-family : 'codicon' ;
15
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
15
+ font-display : block;
16
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
17
+ }
18
+ </ style >
19
+ < style nonce ="#{cspNonce} ">
20
+ @font-face {
21
+ font-family : 'glicons' ;
22
+ font-display : block;
23
+ src : url ('#{root}/dist/glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1' ) format ('woff2' );
16
24
}
17
25
</ style >
18
26
</ body >
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ <h1 data-bind="empty"></h1>
51
51
< style nonce ="#{cspNonce} ">
52
52
@font-face {
53
53
font-family : 'codicon' ;
54
- src : url ('#{root}/dist/webviews/codicon.ttf?669d352dfabff8f6eaa466c8ae820e43' ) format ('truetype' );
54
+ font-display : block;
55
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
55
56
}
56
57
</ style >
57
58
</ body >
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ <h4 id="subhead"></h4>
58
58
< style nonce ="#{cspNonce} ">
59
59
@font-face {
60
60
font-family : 'codicon' ;
61
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
61
+ font-display : block;
62
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
62
63
}
63
64
</ style >
64
65
</ body >
Original file line number Diff line number Diff line change @@ -327,7 +327,8 @@ <h2>Jump to</h2>
327
327
< style nonce ="#{cspNonce} ">
328
328
@font-face {
329
329
font-family : 'codicon' ;
330
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
330
+ font-display : block;
331
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
331
332
}
332
333
</ style >
333
334
</ body >
Original file line number Diff line number Diff line change 1
- @font-face {
2
- font-family : ' glicons' ;
3
- font-display : block ;
4
- src : url (" ./glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1" ) format (" woff2" );
5
- }
1
+ /*
2
+
3
+ Must be placed at the end of body in the HTML file of any webview that needs it (because of CSP)
4
+
5
+ <style nonce="#{cspNonce}">
6
+ @font-face {
7
+ font-family: 'glicons';
8
+ font-display: block;
9
+ src: url("#{root}/dist/glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1") format("woff2");
10
+ }
11
+ </style>
12
+ */
6
13
7
14
.glicon {
8
15
font : normal normal normal 16px / 1 glicons;
Original file line number Diff line number Diff line change 526
526
< style nonce ="#{cspNonce} ">
527
527
@font-face {
528
528
font-family : 'codicon' ;
529
- src : url ('#{webroot}/codicon.ttf?404cbc4fe3a64b9a93064eef76704c79' ) format ('truetype' );
529
+ font-display : block;
530
+ src : url ('#{webroot}/codicon.ttf?0e5b0adf625a37fbcd638d31f0fe72aa' ) format ('truetype' );
530
531
}
531
532
</ style >
532
533
</ body >
You can’t perform that action at this time.
0 commit comments