Skip to content

Commit 2d66e7e

Browse files
committed
🐛 @import fonts css come first
1 parent 6fbd688 commit 2d66e7e

File tree

2 files changed

+187
-186
lines changed

2 files changed

+187
-186
lines changed

website/src/css/custom.css

Lines changed: 2 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import "./fonts.css";
2+
13
:root {
24
--nb-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif,
35
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@@ -16,189 +18,3 @@
1618
body {
1719
font-family: var(--nb-font-family-base);
1820
}
19-
20-
/* webfont-marker-begin */
21-
@import url("https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap");
22-
23-
html body {
24-
font-synthesis: style;
25-
}
26-
/* webfont-marker-end */
27-
28-
@font-face {
29-
font-family: Inter;
30-
font-style: normal;
31-
font-weight: 100 900;
32-
font-display: swap;
33-
src: url("../../static/fonts/inter-roman-cyrillic-ext.woff2") format("woff2");
34-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
35-
U+FE2E-FE2F;
36-
}
37-
38-
@font-face {
39-
font-family: Inter;
40-
font-style: normal;
41-
font-weight: 100 900;
42-
font-display: swap;
43-
src: url("../../static/fonts/inter-roman-cyrillic.woff2") format("woff2");
44-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
45-
}
46-
47-
@font-face {
48-
font-family: Inter;
49-
font-style: normal;
50-
font-weight: 100 900;
51-
font-display: swap;
52-
src: url("../../static/fonts/inter-roman-greek-ext.woff2") format("woff2");
53-
unicode-range: U+1F00-1FFF;
54-
}
55-
56-
@font-face {
57-
font-family: Inter;
58-
font-style: normal;
59-
font-weight: 100 900;
60-
font-display: swap;
61-
src: url("../../static/fonts/inter-roman-greek.woff2") format("woff2");
62-
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
63-
U+03A3-03FF;
64-
}
65-
66-
@font-face {
67-
font-family: Inter;
68-
font-style: normal;
69-
font-weight: 100 900;
70-
font-display: swap;
71-
src: url("../../static/fonts/inter-roman-vietnamese.woff2") format("woff2");
72-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
73-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
74-
U+1EA0-1EF9, U+20AB;
75-
}
76-
77-
@font-face {
78-
font-family: Inter;
79-
font-style: normal;
80-
font-weight: 100 900;
81-
font-display: swap;
82-
src: url("../../static/fonts/inter-roman-latin-ext.woff2") format("woff2");
83-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
84-
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
85-
}
86-
87-
@font-face {
88-
font-family: Inter;
89-
font-style: normal;
90-
font-weight: 100 900;
91-
font-display: swap;
92-
src: url("../../static/fonts/inter-roman-latin.woff2") format("woff2");
93-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
94-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
95-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
96-
}
97-
98-
@font-face {
99-
font-family: Inter;
100-
font-style: italic;
101-
font-weight: 100 900;
102-
font-display: swap;
103-
src: url("../../static/fonts/inter-italic-cyrillic-ext.woff2") format("woff2");
104-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
105-
U+FE2E-FE2F;
106-
}
107-
108-
@font-face {
109-
font-family: Inter;
110-
font-style: italic;
111-
font-weight: 100 900;
112-
font-display: swap;
113-
src: url("../../static/fonts/inter-italic-cyrillic.woff2") format("woff2");
114-
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
115-
}
116-
117-
@font-face {
118-
font-family: Inter;
119-
font-style: italic;
120-
font-weight: 100 900;
121-
font-display: swap;
122-
src: url("../../static/fonts/inter-italic-greek-ext.woff2") format("woff2");
123-
unicode-range: U+1F00-1FFF;
124-
}
125-
126-
@font-face {
127-
font-family: Inter;
128-
font-style: italic;
129-
font-weight: 100 900;
130-
font-display: swap;
131-
src: url("../../static/fonts/inter-italic-greek.woff2") format("woff2");
132-
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
133-
U+03A3-03FF;
134-
}
135-
136-
@font-face {
137-
font-family: Inter;
138-
font-style: italic;
139-
font-weight: 100 900;
140-
font-display: swap;
141-
src: url("../../static/fonts/inter-italic-vietnamese.woff2") format("woff2");
142-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
143-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
144-
U+1EA0-1EF9, U+20AB;
145-
}
146-
147-
@font-face {
148-
font-family: Inter;
149-
font-style: italic;
150-
font-weight: 100 900;
151-
font-display: swap;
152-
src: url("../../static/fonts/inter-italic-latin-ext.woff2") format("woff2");
153-
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
154-
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
155-
}
156-
157-
@font-face {
158-
font-family: Inter;
159-
font-style: italic;
160-
font-weight: 100 900;
161-
font-display: swap;
162-
src: url("../../static/fonts/inter-italic-latin.woff2") format("woff2");
163-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
164-
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
165-
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
166-
}
167-
168-
@font-face {
169-
font-family: "Punctuation SC";
170-
font-weight: 400;
171-
src: local("PingFang SC Regular"), local("Noto Sans CJK SC"),
172-
local("Microsoft YaHei");
173-
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
174-
U+00B7, U+007E, U+002F;
175-
}
176-
177-
@font-face {
178-
font-family: "Punctuation SC";
179-
font-weight: 500;
180-
src: local("PingFang SC Medium"), local("Noto Sans CJK SC"),
181-
local("Microsoft YaHei");
182-
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
183-
U+00B7, U+007E, U+002F;
184-
}
185-
186-
@font-face {
187-
font-family: "Punctuation SC";
188-
font-weight: 600;
189-
src: local("PingFang SC Semibold"), local("Noto Sans CJK SC Bold"),
190-
local("Microsoft YaHei Bold");
191-
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
192-
U+00B7, U+007E, U+002F;
193-
}
194-
195-
@font-face {
196-
font-family: "Punctuation SC";
197-
font-weight: 700;
198-
src: local("PingFang SC Semibold"), local("Noto Sans CJK SC Bold"),
199-
local("Microsoft YaHei Bold");
200-
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
201-
U+00B7, U+007E, U+002F;
202-
}
203-
204-
/* Generate the subsetted fonts using: `pyftsubset <file>.woff2 --unicodes="<range>" --output-file="inter-<style>-<subset>.woff2" --flavor=woff2` */

website/src/css/fonts.css

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/* webfont-marker-begin */
2+
@import url("https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap");
3+
4+
html body {
5+
font-synthesis: style;
6+
}
7+
/* webfont-marker-end */
8+
9+
@font-face {
10+
font-family: Inter;
11+
font-style: normal;
12+
font-weight: 100 900;
13+
font-display: swap;
14+
src: url("../../static/fonts/inter-roman-cyrillic-ext.woff2") format("woff2");
15+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
16+
U+FE2E-FE2F;
17+
}
18+
19+
@font-face {
20+
font-family: Inter;
21+
font-style: normal;
22+
font-weight: 100 900;
23+
font-display: swap;
24+
src: url("../../static/fonts/inter-roman-cyrillic.woff2") format("woff2");
25+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
26+
}
27+
28+
@font-face {
29+
font-family: Inter;
30+
font-style: normal;
31+
font-weight: 100 900;
32+
font-display: swap;
33+
src: url("../../static/fonts/inter-roman-greek-ext.woff2") format("woff2");
34+
unicode-range: U+1F00-1FFF;
35+
}
36+
37+
@font-face {
38+
font-family: Inter;
39+
font-style: normal;
40+
font-weight: 100 900;
41+
font-display: swap;
42+
src: url("../../static/fonts/inter-roman-greek.woff2") format("woff2");
43+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
44+
U+03A3-03FF;
45+
}
46+
47+
@font-face {
48+
font-family: Inter;
49+
font-style: normal;
50+
font-weight: 100 900;
51+
font-display: swap;
52+
src: url("../../static/fonts/inter-roman-vietnamese.woff2") format("woff2");
53+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
54+
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
55+
U+1EA0-1EF9, U+20AB;
56+
}
57+
58+
@font-face {
59+
font-family: Inter;
60+
font-style: normal;
61+
font-weight: 100 900;
62+
font-display: swap;
63+
src: url("../../static/fonts/inter-roman-latin-ext.woff2") format("woff2");
64+
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
65+
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
66+
}
67+
68+
@font-face {
69+
font-family: Inter;
70+
font-style: normal;
71+
font-weight: 100 900;
72+
font-display: swap;
73+
src: url("../../static/fonts/inter-roman-latin.woff2") format("woff2");
74+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
75+
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
76+
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
77+
}
78+
79+
@font-face {
80+
font-family: Inter;
81+
font-style: italic;
82+
font-weight: 100 900;
83+
font-display: swap;
84+
src: url("../../static/fonts/inter-italic-cyrillic-ext.woff2") format("woff2");
85+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
86+
U+FE2E-FE2F;
87+
}
88+
89+
@font-face {
90+
font-family: Inter;
91+
font-style: italic;
92+
font-weight: 100 900;
93+
font-display: swap;
94+
src: url("../../static/fonts/inter-italic-cyrillic.woff2") format("woff2");
95+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
96+
}
97+
98+
@font-face {
99+
font-family: Inter;
100+
font-style: italic;
101+
font-weight: 100 900;
102+
font-display: swap;
103+
src: url("../../static/fonts/inter-italic-greek-ext.woff2") format("woff2");
104+
unicode-range: U+1F00-1FFF;
105+
}
106+
107+
@font-face {
108+
font-family: Inter;
109+
font-style: italic;
110+
font-weight: 100 900;
111+
font-display: swap;
112+
src: url("../../static/fonts/inter-italic-greek.woff2") format("woff2");
113+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
114+
U+03A3-03FF;
115+
}
116+
117+
@font-face {
118+
font-family: Inter;
119+
font-style: italic;
120+
font-weight: 100 900;
121+
font-display: swap;
122+
src: url("../../static/fonts/inter-italic-vietnamese.woff2") format("woff2");
123+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
124+
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
125+
U+1EA0-1EF9, U+20AB;
126+
}
127+
128+
@font-face {
129+
font-family: Inter;
130+
font-style: italic;
131+
font-weight: 100 900;
132+
font-display: swap;
133+
src: url("../../static/fonts/inter-italic-latin-ext.woff2") format("woff2");
134+
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
135+
U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
136+
}
137+
138+
@font-face {
139+
font-family: Inter;
140+
font-style: italic;
141+
font-weight: 100 900;
142+
font-display: swap;
143+
src: url("../../static/fonts/inter-italic-latin.woff2") format("woff2");
144+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
145+
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
146+
U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
147+
}
148+
149+
@font-face {
150+
font-family: "Punctuation SC";
151+
font-weight: 400;
152+
src: local("PingFang SC Regular"), local("Noto Sans CJK SC"),
153+
local("Microsoft YaHei");
154+
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
155+
U+00B7, U+007E, U+002F;
156+
}
157+
158+
@font-face {
159+
font-family: "Punctuation SC";
160+
font-weight: 500;
161+
src: local("PingFang SC Medium"), local("Noto Sans CJK SC"),
162+
local("Microsoft YaHei");
163+
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
164+
U+00B7, U+007E, U+002F;
165+
}
166+
167+
@font-face {
168+
font-family: "Punctuation SC";
169+
font-weight: 600;
170+
src: local("PingFang SC Semibold"), local("Noto Sans CJK SC Bold"),
171+
local("Microsoft YaHei Bold");
172+
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
173+
U+00B7, U+007E, U+002F;
174+
}
175+
176+
@font-face {
177+
font-family: "Punctuation SC";
178+
font-weight: 700;
179+
src: local("PingFang SC Semibold"), local("Noto Sans CJK SC Bold"),
180+
local("Microsoft YaHei Bold");
181+
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026,
182+
U+00B7, U+007E, U+002F;
183+
}
184+
185+
/* Generate the subsetted fonts using: `pyftsubset <file>.woff2 --unicodes="<range>" --output-file="inter-<style>-<subset>.woff2" --flavor=woff2` */

0 commit comments

Comments
 (0)