ui: enhance font selection

This commit is contained in:
undefined committed 2022-02-22 00:43:17 +08:00
1 parent 9b2c36efbf
commit 49a60eeaa1
4 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
padding: 5px 40px 0px 0px !important
.graphiql-container .docExplorerWrap
font-family: "Source Code Pro", "Consolas" !important
font-family: var(--code-font-family) !important
.graphiql-container .doc-explorer-back
overflow: hidden;
@@ -74,6 +74,10 @@ const page = new NamedPage('home_preference', () => {
this.style.fontFamily = this.getAttribute('value');
this.textContent = i18n(this.textContent.trim());
});
function updateFont() {
this.style.fontFamily = $(this).val();
}
$('[name="fontFamily"], [name="codeFontFamily"]').on('change', updateFont).each(updateFont);
});
export default page;