diff --git a/assets/script/main.js b/assets/script/main.js index beeb298..fada563 100644 --- a/assets/script/main.js +++ b/assets/script/main.js @@ -205,9 +205,4 @@ function onclear() { calgroup.style.display = "none"; } -document.getElementById("themeToggle").addEventListener("click", function () { - const currentTheme = document.documentElement.getAttribute("data-theme"); - const newTheme = currentTheme === "light" ? "dark" : "light"; - document.documentElement.setAttribute("data-theme", newTheme); - localStorage.setItem("theme", newTheme); -}); +// Removed theme toggle event listener diff --git a/assets/stylesheet/style.css b/assets/stylesheet/style.css index fcaa661..603821a 100644 --- a/assets/stylesheet/style.css +++ b/assets/stylesheet/style.css @@ -6,6 +6,8 @@ body { font-family: 'poppins'; font-size: 14px; + background-color: #f8f9fa; /* Default background color */ + color: #212529; /* Default text color */ } h1 { @@ -28,9 +30,9 @@ label { #calcform { max-width: 500px; padding: 20px; - background: var(--form-bg); - border: 1px solid var(--form-border); - border-radius: 10px; /* Increased border radius */ + background: #ffffff; + border: 1px solid #e0e0e0; + border-radius: 20px; /* Increased border radius for more rounded appearance */ } #calcform button img { @@ -59,9 +61,9 @@ label { } #cal2tbl tbody tr td:nth-child(3) { - background: var(--table-bg); - border: dashed 1px var(--table-border); - color: var(--cal-text); /* Adjust text color to fit theme */ + background: #f8f8f8; + border: dashed 1px #333; + color: #212529; /* Adjusted text color for better contrast */ } th { @@ -78,22 +80,18 @@ td { } #cal { - background: var(--cal-bg); + background: #e9ecef; padding: .375rem .75rem; font-size: 13px; - color: var(--cal-text); - border: 1px solid var(--cal-border); + color: #212529; /* Adjusted text color for better contrast */ + border: 1px solid #ced4da; + height: auto; } #cal2tbl { font-size: 12px; } -#cal { - background: var(--cal-bg); - height: auto; -} - .btn span { font-size: 14px; } @@ -122,7 +120,8 @@ footer a { } .input-error { - border-color: red; + /*colour of the error message */ + border-color: #bc3545; background-color: #ffe6e6; } @@ -135,49 +134,12 @@ footer a { } } -/* Light Theme */ -:root[data-theme='light'] { - --form-bg: #ffffff; - --form-border: #e0e0e0; - --table-bg: #f8f8f8; - --table-border: #333; - --cal-bg: #e9ecef; - --cal-text: #495057; - --cal-border: #ced4da; - --btn-secondary-bg: #6c757d; - --btn-secondary-border: #6c757d; - --btn-success-bg: #28a745; - --btn-success-border: #28a745; - --input-error-bg: #ffe6e6; -} - -/* Dark Theme */ -:root[data-theme='dark'] { - --form-bg: #2d2d2d; - --form-border: #444; - --table-bg: #3a3a3a; - --table-border: #666; - --cal-bg: #3a3a3a; - --cal-text: #e9ecef; - --cal-border: #555; - --btn-secondary-bg: #5a6268; - --btn-secondary-border: #5a6268; - --btn-success-bg: #218838; - --btn-success-border: #218838; - --input-error-bg: #5a2a2a; -} - -body[data-theme='dark'] { - background-color: #121212; - color: #e9ecef; -} - .btn-secondary { - background-color: var(--btn-secondary-bg); - border-color: var(--btn-secondary-border); + background-color: #6c757d; /* Default button color */ + border-color: #6c757d; /* Default button border color */ } .btn-success { - background-color: var(--btn-success-bg); - border-color: var(--btn-success-border); + background-color: #28a745; /* Default button color */ + border-color: #28a745; /* Default button border color */ } \ No newline at end of file diff --git a/index.html b/index.html index 4204f99..5b128f9 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -32,9 +32,6 @@

Base Converter

-
- -

Convert number from any base to any base: