Skip to content

fix: Correct timer CSS selector from #timer to .timer + Add Reset buttonFix/timer css selector#149

Open
VanshikaAsthana wants to merge 2 commits into
JIYAJAIN30:mainfrom
VanshikaAsthana:fix/timer-css-selector
Open

fix: Correct timer CSS selector from #timer to .timer + Add Reset buttonFix/timer css selector#149
VanshikaAsthana wants to merge 2 commits into
JIYAJAIN30:mainfrom
VanshikaAsthana:fix/timer-css-selector

Conversation

@VanshikaAsthana

Copy link
Copy Markdown

🔗 Fixes

Closes #148

🐛 Bug Fix 1 — CSS Selector Mismatch

Problem

style.css targets #timer (ID selector) but index.html uses
class="timer". This caused the timer's intended styles — blue color,
2rem font size, bold weight, letter spacing — to never apply.

Fix

Changed #timer.timer in style.css.

✨ Bug Fix 2 — No way to Reset Timer

Problem

After stopping the timer, seconds was never cleared. No reset
functionality existed.

Fix

Added resetTimer() function and a Reset button in the UI.

📸 Before & After

Screenshot 2026-06-12 195911 Screenshot 2026-06-12 195008

| Timer plain black, no styling | Timer blue, bold, correctly styled |

🧪 Testing

  • Opened index.html locally in browser
  • Verified timer renders blue and styled after CSS fix
  • Verified Reset button clears timer back to 00:00:00

Submitted as part of GSSoC 2026 contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Timer styles not applying due to CSS ID/class selector mismatch

1 participant