RetroDECK-Website/scripts/accessibility.js
2024-09-23 18:11:44 -04:00

10 lines
415 B
JavaScript

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