feature(font): add serif and sans choose

This commit is contained in:
周中平 2022-01-16 03:20:40 +08:00
parent 9cc75c1376
commit b80acf799b
No known key found for this signature in database
GPG Key ID: B1DF9DD42D8E00DC
2 changed files with 31 additions and 0 deletions

13
source/css/font.css Normal file
View File

@ -0,0 +1,13 @@
body {
font-size: 16px;
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
}
[data-font=serif] {
font-family: -apple-system, BlinksMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
[data-font=sans] {
font-family: -apple-system, BlinksMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

18
source/css/font.scss Normal file
View File

@ -0,0 +1,18 @@
@charset "UTF-8";
body {
font-size: 16px;
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
}
[data-font="serif"]{
font-family: -apple-system, BlinksMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}
[data-font="sans"]{
font-family: -apple-system, BlinksMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}