Design comparison
Solution retrospective
I did not encounter any issues while creating this webpage. I have a question, though. Is it alright to toggle visibility of the share section using the way I did (creating class hidden and giving it a display:none, and then in js file creating function that toggles the class) or are there any better solutions?
Community feedback
- @visualdennissPosted over 1 year ago
Congrats on completing the challenge successfully! Everything looks great and it is responsive as well.
"Is it alright to toggle visibility of the share section using the way I did (creating class hidden and giving it a display:none, and then in js file creating function that toggles the class)"
Yes, the way you did with class toggle is perfectly fine and valid. In fact thats also how i did it for this challenge. Only thing is, when you want to add an animation, it becomes tricky as it cannot be animated from display:block to none. But there are other workarounds like changing opacity etc.
On a small note, you could also change cursor:pointer; for the button in addition to background change, as it indicates user that it is a clickable button.
Hope you find this feedback helpful!
Marked as helpful1@MichalBednarPosted over 1 year ago@visualdenniss Thank you, I always try to apply the pointer for clickable elements, but it looks like I forgot this time, so I'm, glad you noticed!
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