allow changing the font-family
This commit is contained in:
parent
86597aabca
commit
e083856801
2 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$font-family: var(--font-family, $font-family);
|
||||||
|
$monospace-font-family: var(--font-family-monospace, $monospace-font-family);
|
||||||
//
|
//
|
||||||
// --accent-color
|
// --accent-color
|
||||||
$accent-color: var(--accent-color);
|
$accent-color: var(--accent-color);
|
||||||
|
|
|
@ -60,6 +60,15 @@ function setCustomThemeVars(customTheme) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (customTheme.fonts) {
|
||||||
|
const {fonts} = customTheme;
|
||||||
|
if (fonts.general) {
|
||||||
|
style.setProperty("--font-family", fonts.general);
|
||||||
|
}
|
||||||
|
if (fonts.monospace) {
|
||||||
|
style.setProperty("--font-family-monospace", fonts.monospace);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCustomTheme(themeName) {
|
export function getCustomTheme(themeName) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue