Has anyone else had problems with this project? I have gone through it twice, reseting and starting fresh. From my perspective nothing is applying when I run the code. I’m not sure what I’m missing.
I’ve imported styles this way:
import styles from ‘./styles/Game.module.css’
&
this way:
‘./Game.module.css’
I honestly don’t know why that is. Once I did that and made sure to use “className” instead of “style” for each of the divs we were applying the styles to it worked.
I wish I could be more helpful, but I’m at a loss.
I went through your code and it Is almost the same as mine. The styling renders for me.
The only difference I could spot is that you on line 77 applied the style choiceStyles and I emojiStyles. But that should not affect the overall rendering
In Game.js, in the four objects choiceStyles, emojiStyles, nameStyles and resultStyle, why do you have semi-colons after the last property? It should either be a comma or nothing.
For example:
const emojiStyles = {
fontSize: 64,
marginRight: 20; // Not correct
};
const emojiStyles = {
fontSize: 64,
marginRight: 20, // Use a comma
};
const emojiStyles = {
fontSize: 64,
marginRight: 20 // or nothing
};
Ok, I was having this issue and I changed the import statement to: import styles from ‘./Game.module.css’ and on the div I used the word className instead of style and it finally worked.
The only change that worked is the first step of changing the title. I’ve done everything exactly as the video run through and none of the other inline styling has worked.
I’ve inspected the elements and the in line styles are not there but they are there in the project workspace.
Did you ever get a response to that bug you raised. tbh im not sure what the issue is.