Design comparison
Solution retrospective
Hey everyone,
Here is my solution to this challenge, hope you like it.
Any feedback is more than appreciated. :)
Community feedback
- @correlucasPosted about 2 years ago
👾Hi @Frozennn, congratulations on your first solution!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
When you add some
hover effects
you've to think that for the mobile version there's an issue that the elements with hover getstuck
on the active state of the hover until you click on something else. Something you can do to avoid this problem on mobile, the stick hover, is to add a media query saying that you want hover effects only on devices that are nottouch
. So you can use:@media (hover: hover) { {ADD HERE ALL THE CLASSES WITH HOVER EFFECTS TO DISABLE IT ON MOBILE} }
Its really nice that you’ve used some animation and effects! Something to improve the accessibility its to add a media query reducing the motion.The prefers-reduced-motion CSS media feature is used to detect if the user has requested that the system minimize the amount of non-essential motion it uses. Here’s the code for that:
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */ @media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, and making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful0@FrozennnPosted about 2 years ago@correlucas Hey,
Thanks for the wonderful suggestions!
0 - @aecio-netoPosted about 2 years ago
Hi, Marko. Congratulations on completing the project. It looks great!
Here are some considerations:
- Indentation and space in the code - a good practice is to organize your code in a more readable way. You can eliminate some lines in your html. No need to break lines in the
<link>
and<img>
properties.
Anyway, the html is very well done. I saw that you used semantic tags, filled in the
alt
of the image and much more.CSS: lean and objective. Excellent.
Congratulations on the work.
Hope this helps.
Marked as helpful0@FrozennnPosted about 2 years ago@aecio-neto Hey,
Thank you for the compliments.
Regarding the indentation and space in the code, I have an extension in my vs code that does it for me. And I think you are right some of the line breaks are unnecessary, maybe I should consider turning off the extension.
0 - Indentation and space in the code - a good practice is to organize your code in a more readable way. You can eliminate some lines in your html. No need to break lines in the
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