Skip to content

Commit e71336e

Browse files
committed
feat: add the ability to use system fonts
1 parent e0a523a commit e71336e

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

packages/keybr-themes/lib/fonts/index.less

+24
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,30 @@ html[data-font="ubuntu"] {
118118
--value-font-family: "Ubuntu Mono", monospace;
119119
}
120120

121+
html[data-font="sans-serif"] {
122+
--default-font-family: sans-serif;
123+
--header-font-family: sans-serif;
124+
--value-font-family: sans-serif;
125+
}
126+
127+
html[data-font="serif"] {
128+
--default-font-family: serif;
129+
--header-font-family: serif;
130+
--value-font-family: serif;
131+
}
132+
133+
html[data-font="monospace"] {
134+
--default-font-family: monospace;
135+
--header-font-family: monospace;
136+
--value-font-family: monospace;
137+
}
138+
139+
html[data-font="cursive"] {
140+
--default-font-family: cursive;
141+
--header-font-family: cursive;
142+
--value-font-family: cursive;
143+
}
144+
121145
html {
122146
font-family: var(--default-font-family);
123147
font-size: 8px;

packages/keybr-themes/lib/themes/themes.ts

+16
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,20 @@ export const FONTS = new ThemeList([
9999
id: "cormorant",
100100
name: "Cormorant",
101101
},
102+
{
103+
id: "sans-serif",
104+
name: "sans-serif (System)",
105+
},
106+
{
107+
id: "serif",
108+
name: "serif (System)",
109+
},
110+
{
111+
id: "monospace",
112+
name: "monospace (System)",
113+
},
114+
{
115+
id: "cursive",
116+
name: "cursive (System)",
117+
},
102118
]);

0 commit comments

Comments
 (0)