Design comparison
Solution retrospective
Hi all, I am interested in:
- How to declutter my JS?
- How to prevent the content of the page from "jumping"? When in mobile (light) mode switching to darkmode, appears s a divider between "Dark Mode" and "Total Followers". This divider is only visible in darkmode. Due to the class ".visible_divider" which is append via JS.
- The switcher / Toggle Buttons after reload does not switch to the right but stays on the left. (Dark Mode side) Best and stay healthy
Community feedback
- @samuelpalaciosdevPosted over 3 years ago
Hi, Svenπ
Good job on this challenge! Your solution looks good and it scales pretty well.π
I only suggest some things π:
-
Changing the styles for the social media icons. As I see on you project, the twitter icon looks different from the others. That's because you set a
width
on them, I'd delete it, makes them look better. -
Setting a padding on the
main
element. You only have padding for the left & right, but the "Social media dashboard" is too close to the top of the page, I'd addpadding: 2rem 3rem
on the 768px media query.
I hope this would help you, have a nice day, keep coding!π
1@samuelpalaciosdevPosted over 3 years agoBtw, I forgot, check those HTMl Issues, I suggest you to use the [W3C Markup Validation Service] (https://validator.w3.org) everytime you make a project, hope this helps you ;)
0 -
- @yasssuzPosted over 3 years ago
hello Sven!
here a few things:
- About your js, I would put most of the variables inside the function, take a look at this article on why global variables suck
- your content is jumping because you're removing the
<div id="divider" class="visible_divider"></div>
, don't remove it! just addvisibility: hidden; opacity: 0;
and you're done. - Because you're reloading the page without saving in the memory that the user changed to another mode. Memory management in javascript is a little bit advanced, so make sure you know javascript well before getting into it. But here you have an article about memory management.
happy coding and if I was helpful please upvote my comment.
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