Design comparison
Solution retrospective
I have successfully completed this challenge and I am open to receiving any feedback or corrections. After deployment, I don't know why the cyan color
is not displaying. Other than that I did enjoy working on this project.
Community feedback
- @markuslewinPosted about 1 year ago
It's because
.bg-cyan-700
is declared before.bg-softRed
in the generated CSS of Tailwind. It doesn't matter if you writeclassName="bg-softRed bg-cyan-700"
orclassName="bg-cyan-700 bg-softRed"
, the red will always override the cyan.You could instead write:
<div className={`${items.day === "wed" ? "bg-cyan-700" : "bg-softRed"}`} />
That way, the logic applies either cyan or red!
Marked as helpful0@Mike-DavePosted about 1 year ago@markuslewin Thank you for the feedback. I agree with what you wrote and will be implementing it as well.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord