diff --git a/css/style.css b/css/style.css index 3c651e2..0cd20b1 100644 --- a/css/style.css +++ b/css/style.css @@ -141,6 +141,7 @@ table input:enabled { #colorPicker{ width: 2.5rem; + height: auto; } @media (prefers-color-scheme:dark) { diff --git a/js/sudoku.js b/js/sudoku.js index 87c3b91..0dec946 100755 --- a/js/sudoku.js +++ b/js/sudoku.js @@ -11,6 +11,7 @@ let history = [] let accessKeyModifiers = "AccessKey+" let easyBoxes = [] let insertRadios = [] +let defautColor = "" function shuffle(iterable) { array = Array.from(iterable) @@ -80,8 +81,9 @@ window.onload = function() { } loadSavedGame() - - colorPicker.value = getComputedStyle(document.body).getPropertyValue("--bs-body-color") + + defautColor = getComputedStyle(grid).getPropertyValue("--bs-body-color") + colorPicker.value = defautColor if ("serviceWorker" in navigator) { navigator.serviceWorker.register(`service-worker.php?location=${location.pathname}`) @@ -174,7 +176,7 @@ function oninput() { this.previousPlaceholder = this.placeholder refreshBox(this) } - if (colorPicker.value) { + if (colorPicker.value && colorPicker.value != defautColor) { this.style.setProperty("color", colorPicker.value) } } diff --git a/sudoku.php b/sudoku.php index ecfb258..1467419 100755 --- a/sudoku.php +++ b/sudoku.php @@ -24,7 +24,7 @@ - +