
Design comparison
Solution retrospective
Le challenge que j'ai rencontré, c'était comment écouter le redimensionnement de l'écran, je l'ai resolu grace à ce site : MDN, voici donc ma solution :
What specific areas of your project would you like help with?onresize = (event) => { if(window.innerWidth > 950) { shareOptionComponent.style.width = "fit-content"; shareOptionComponent.style.backgroundColor = "#FFF"; authorComponent.style.display = "flex"; shareOptionComponent.childNodes[1].classList.replace("share-option-mobile", "share-option-desktop"); }else { shareOptionComponent.childNodes[1].classList.replace("share-option-desktop", "share-option-mobile"); authorComponent.style.display = classAdded ? "none" : "flex"; shareOptionComponent.style.width = classAdded ? "100%" : "20%" shareOptionComponent.style.backgroundColor = classAdded ? "hsl(214, 17%, 51%)" : " hsl(210, 46%, 95%)"; } };
J'ai ajouter un border radiu à l'option de partage en version mobile, mais c'est pas ç'a n'a aucun éffet, si tu as une idée de mon erreur, n'hésite pas à me le souligner.
share { ... border-radius: 0 O 1rem 1rem !important; overflow: hidden; }
Community feedback
- @MosacdPosted 8 months ago
hey there✌️😁
Css could use some work, but u were probably just focusing on Javascript, so good work in that department👌
good luck
0
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