Skip to content

Commit

Permalink
fix(sass): use "font-face" to import fonts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Messi committed Nov 3, 2024
1 parent 428eba6 commit bde4165
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions packages/Solis/style/font.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
/* 引入多个权重的 SN Pro 字体 */
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/400.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/500.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/600.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/700.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/800.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/900.css');
@font-face {
font-family: 'SN Pro';
font-weight: 400;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-400-normal.woff2') format('woff2');
}

@font-face {
font-family: 'SN Pro';
font-weight: 500;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-500-normal.woff2') format('woff2');
}

@font-face {
font-family: 'SN Pro';
font-weight: 600;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-600-normal.woff2') format('woff2');
}

@font-face {
font-family: 'SN Pro';
font-weight: 700;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-700-normal.woff2') format('woff2');
}

@font-face {
font-family: 'SN Pro';
font-weight: 800;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-800-normal.woff2') format('woff2');
}

@font-face {
font-family: 'SN Pro';
font-weight: 900;
src: url('https://cdn.jsdelivr.net/npm/@fontsource/sn-pro/files/sn-pro-latin-900-normal.woff2') format('woff2');
}

/* 全局设置 */
:root {
Expand Down

0 comments on commit bde4165

Please sign in to comment.