RetroDECK-Website/scripts/accessibility.js

10 lines
415 B
JavaScript
Raw Normal View History

function pixelFontToggle() {
2024-09-23 23:56:49 +00:00
const pixelFontDefault = '\"Upheaval TT\", monospace;'
2024-09-23 23:56:49 +00:00
const pixelFontSwitchElem = document.getElementById('pixel-font-switch');
if (pixelFontSwitchElem.checked) {
2024-09-23 23:56:49 +00:00
document.documentElement.style.cssText = '--pixel-font: \"Upheaval TT\", monospace';
} else {
2024-09-23 23:56:49 +00:00
document.documentElement.style.cssText = '--pixel-font: \"Source Sans 3\", sans-serif';
}
}