@@ -33,8 +33,10 @@ const solutionDiv = document.getElementById('solution');
3333const submitButton = document . getElementById ( 'submit-button' ) ;
3434// the New Game button
3535const newGameButton = document . getElementById ( 'new-game-button' ) ;
36- // the streak counter from the bottom of the page
36+ // the streak counter at the bottom of the page
3737const streakCounter = document . getElementById ( 'streak-counter' ) ;
38+ // the div containing the perfect streak text and counter at the bottom of the page
39+ const streakDiv = document . getElementById ( 'streak-div' ) ;
3840
3941// Milestones
4042const milestoneSection = document . getElementById ( 'milestone-section' ) ;
@@ -380,7 +382,7 @@ function showMilestones() {
380382 switch ( streak ) {
381383 case 0 :
382384 // change color of streak number
383- streakCounter . style . color = 'black ';
385+ streakDiv . style . backgroundColor = 'var(--white) ';
384386 break ;
385387 case 1 :
386388 // set streak milestone color
@@ -392,9 +394,9 @@ function showMilestones() {
392394 streakDisplay . textContent = streak ;
393395 streakText . style . backgroundColor = color ;
394396 // change color of Continue button
395- continueGameButton . style . backgroundColor = buttonColor ;
396- // change color of streak number
397- streakCounter . style . color = color ;
397+ continueGameButton . style . backgroundColor = buttonColor ;
398+ // change color of the streak div
399+ streakDiv . style . backgroundColor = buttonColor ;
398400 // run new game after milestone "popup"
399401 newGame ( ) ;
400402 break ;
@@ -408,25 +410,25 @@ function showMilestones() {
408410 streakDisplay . textContent = streak ;
409411 streakText . style . backgroundColor = color ;
410412 // change color of Continue button
411- continueGameButton . style . backgroundColor = buttonColor ;
412- // change color of streak number
413- streakCounter . style . color = color ;
413+ continueGameButton . style . backgroundColor = buttonColor ;
414+ // change color of the streak div
415+ streakDiv . style . backgroundColor = buttonColor ;
414416 // run new game after milestone "popup"
415417 newGame ( ) ;
416418 break ;
417419 case 3 :
418420 // set streak milestone color
419421 color = 'var(--med-orange)' ;
420- buttonColor = 'var(--light-orange )' ;
422+ buttonColor = 'var(--peach )' ;
421423 // show the `milestoneSection`
422424 showMilestone ( ) ;
423425 // show streak count on `milestoneSection`
424426 streakDisplay . textContent = streak ;
425427 streakText . style . backgroundColor = color ;
426428 // change color of Continue button
427- continueGameButton . style . backgroundColor = buttonColor ;
428- // change color of streak number
429- streakCounter . style . color = color ;
429+ continueGameButton . style . backgroundColor = buttonColor ;
430+ // change color of the streak div
431+ streakDiv . style . backgroundColor = buttonColor ;
430432 // run new game after milestone "popup"
431433 newGame ( ) ;
432434 break ;
0 commit comments