Really weird JS/CSS problem. What is going on here? Codepen included

A Pen by Trenton (codepen.io)

So, I’m getting pretty close to finishing a really fun project I’ve been working on, It’s a memory matching game.

this question is regarding the function at line 97 called displayGameWon(), this function would originally display the game won screen if you had found all of the matches but I set it to display after 1 match to make it easier to work with.

now in the CSS I have the gameWonDisplayScreen display set to none and when the condition is met it will set the display to flex. The code works and it DOES set the display to flex but nothing becomes displayed on the screen? If I go into my css and manually turn the display from none to flex it works just find and everything renders on the screen. But in my JS nothing actually displays when the condition is met? What is going on here?

the gamewondisplayscreen CSS is on line 110 in the CSS file

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.