Skip to content

Commit 4c111c8

Browse files
committed
perf: use local fonts + move some static css to emotion global styles
1 parent 90c15af commit 4c111c8

17 files changed

+219
-23
lines changed
Lines changed: 75 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,85 @@
1+
/*
2+
html, body, div, span, applet, object, iframe,
3+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
4+
a, abbr, acronym, address, big, cite, code,
5+
del, dfn, em, img, ins, kbd, q, s, samp,
6+
small, strike, strong, sub, sup, tt, var,
7+
b, u, i, center,
8+
dl, dt, dd, ol, ul, li,
9+
fieldset, form, label, legend,
10+
table, caption, tbody, tfoot, thead, tr, th, td,
11+
article, aside, canvas, details, embed,
12+
figure, figcaption, footer, header, hgroup,
13+
menu, nav, output, ruby, section, summary,
14+
time, mark, audio, video {
15+
margin: 0;
16+
padding: 0;
17+
border: 0;
18+
font-size: 100%;
19+
font: inherit;
20+
vertical-align: baseline;
21+
}
22+
article, aside, details, figcaption, figure,
23+
footer, header, hgroup, menu, nav, section {
24+
display: block;
25+
}
26+
body {
27+
line-height: 1;
28+
}
29+
ol, ul {
30+
list-style: none;
31+
}
32+
blockquote, q {
33+
quotes: none;
34+
}
35+
blockquote:before, blockquote:after,
36+
q:before, q:after {
37+
content: '';
38+
content: none;
39+
}
40+
table {
41+
border-collapse: collapse;
42+
border-spacing: 0;
43+
}
44+
*/
45+
146

247
/* ------- resets ------- */
3-
* { margin:0;padding:0 }
4-
html, body { height:100%;box-sizing:border-box }
5-
*, *::before, *::after { box-sizing:inherit }
6-
img { max-width:100% }
7-
a { color:inherit;text-decoration:none }
8-
ul, menu { list-style-type:none }
9-
h1,h2,h3,h4,h5,h6 { font-weight:inherit }
10-
strong { font-weight:700 }
11-
figure { text-align:center }
12-
figcaption { font-size:0.9em }
13-
table, hr { border:0 }
14-
nav, menu { letter-spacing:0 }
15-
sup { font-size:66% }
48+
49+
* { margin: 0; padding: 0 }
50+
html, body { height: 100%; box-sizing: border-box }
51+
*, *::before, *::after { box-sizing: inherit }
52+
img { max-width: 100% }
53+
a { color: inherit; text-decoration: none }
54+
ul, menu { list-style-type: none }
55+
h1,h2,h3,h4,h5,h6 { font-weight: inherit }
56+
strong { font-weight: 700 }
57+
figure { text-align: center }
58+
figcaption { font-size: 0.9em }
59+
table, hr { border: 0 }
60+
nav, menu { letter-spacing: 0 }
61+
sup { font-size: 66% }
1662

1763
/* ------- body ------- */
1864
body {
1965
background:#d3d3d3;
2066
color:#070707;
21-
font:400 16px/1.45 'Avenir Next',Avenir,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
22-
letter-spacing:1px;
23-
text-rendering:optimizeLegibility;
24-
-webkit-font-smoothing:antialiased;
25-
-webkit-tap-highlight-color:transparent;
26-
-moz-osx-font-smoothing:grayscale;
67+
font: 400 16px/1.45 'Avenir Next', Avenir, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
68+
letter-spacing: 1px;
69+
text-rendering: optimizeLegibility;
70+
-webkit-font-smoothing: antialiased;
71+
-webkit-tap-highlight-color: transparent;
72+
-moz-osx-font-smoothing: grayscale
2773
}
2874

2975
/* ------- app ------- */
30-
#app { width:100%;height:100%;opacity:0;transition:opacity 0.44s 0.22s }
31-
#app.ready { font-family:'Comfortaa',cursive;opacity:1 }
76+
#app {
77+
width: 100%;
78+
height: 100%;
79+
opacity: 0;
80+
transition: opacity 0.44s 0.22s
81+
}
82+
#app.ready {
83+
font-family: 'Comfortaa', cursive;
84+
opacity:1
85+
}

dist/assets/static/css/fonts.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@font-face {
2+
font-family: 'Comfortaa';
3+
font-style: normal;
4+
font-weight: 300;
5+
font-display: swap;
6+
src: local('Comfortaa'),
7+
url('../fonts/comfortaa-v28-latin-300.woff2') format('woff2'),
8+
url('../fonts/comfortaa-v28-latin-300.woff') format('woff');
9+
}
10+
@font-face {
11+
font-family: 'Comfortaa';
12+
font-style: normal;
13+
font-weight: 400;
14+
font-display: swap;
15+
src: local('Comfortaa'),
16+
url('../fonts/comfortaa-v28-latin-regular.woff2') format('woff2'),
17+
url('../fonts/comfortaa-v28-latin-regular.woff') format('woff');
18+
}
19+
/* @font-face {
20+
font-family: 'Comfortaa';
21+
font-style: normal;
22+
font-weight: 500;
23+
font-display: swap;
24+
src: local('Comfortaa'), url('../fonts/comfortaa-v28-latin-500.woff2') format('woff2'),
25+
url('../fonts/comfortaa-v28-latin-500.woff') format('woff');
26+
}
27+
@font-face {
28+
font-family: 'Comfortaa';
29+
font-style: normal;
30+
font-weight: 600;
31+
font-display: swap;
32+
src: local('Comfortaa'), url('../fonts/comfortaa-v28-latin-600.woff2') format('woff2'),
33+
url('../fonts/comfortaa-v28-latin-600.woff') format('woff');
34+
} */
35+
@font-face {
36+
font-family: 'Comfortaa';
37+
font-style: normal;
38+
font-weight: 700;
39+
font-display: swap;
40+
src: local('Comfortaa'),
41+
url('../fonts/comfortaa-v28-latin-700.woff2') format('woff2'),
42+
url('../fonts/comfortaa-v28-latin-700.woff') format('woff');
43+
}
21 KB
Binary file not shown.
17.3 KB
Binary file not shown.
21.5 KB
Binary file not shown.
17.7 KB
Binary file not shown.
21.5 KB
Binary file not shown.
17.7 KB
Binary file not shown.
21.2 KB
Binary file not shown.
17.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)