From 82a10ff9381f6a4c7facad721cfc65199950b27e Mon Sep 17 00:00:00 2001 From: BYUIOMDA Date: Sun, 24 Sep 2023 20:42:46 -0600 Subject: [PATCH] 0.1.35 another attempt --- index.html | 1 + scripts/darkmode.js | 5 ++--- styles/base.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index bb8c434..eaa235a 100644 --- a/index.html +++ b/index.html @@ -35,6 +35,7 @@

Matthew Anderson

WDD 230: Web Frontend Development

+

Learning Activities

    diff --git a/scripts/darkmode.js b/scripts/darkmode.js index 2227085..9bb9ca9 100644 --- a/scripts/darkmode.js +++ b/scripts/darkmode.js @@ -1,5 +1,4 @@ -// darkmode.js function toggleDarkMode() { - const body = document.body; - body.classList.toggle('dark-mode'); + const main = document.querySelector('main'); + main.classList.toggle('dark-mode'); } \ No newline at end of file diff --git a/styles/base.css b/styles/base.css index 3b6a5f9..b1bb08d 100644 --- a/styles/base.css +++ b/styles/base.css @@ -8,7 +8,7 @@ span {background-color: red} hr { border-top: .25rem solid #000000; } -.dark-mode { +.dark-mode main { background-color: #1f1f1f; color: #ffffff; }