Design comparison
Solution retrospective
My responsiveness struggle a bit. Can you please review my code and look for code which should be changed ?
Thanks in advance!
Community feedback
- @GrzywNPosted over 2 years ago
Great job @martinelias1312!
I have some suggestions regarding your solution:
To make your site more responsive it's good to use specific width containers and center them horizontally. It would make it, so your site on widths higher than 1440px will look the same. To make image more fluid/responsive, you can use
aspect-ratio
property in CSS. Now it's shrinking width, but height is the same as before.The most important problem in your work I see is its clarity. I would recommend you to make your code cleaner and more maintainable. You can improve your code by:
- Learning and using some naming convention like BEM. You can also check Cube CSS, but I personally don't use it.
- You should also improve architecture of your project. Your project has 4 scss files, but it's all mixed up and not really readable. I personally use Sass 7-1 pattern. More about it here
- I would suggest you to keep consistent throughout your project. Some of your variables are named differently like one
$Font-family
starts with uppercase and$font-size-p
starts with lowercase. Or other things like alternating CSS class selectors with tag selectors. It's good to name everything with class (it's also part of BEM, which I mentioned earlier). IDs are bad tho, because elements targeted with ID are specific to one element and they are not reusable.
Other things/sources which might come in handy and are worth reading/watching:
- Easy and Clean Responsive Media Queries using SASS/SCSS
- Sass Guidelines
- 8 Tips to Help You Get the Best out of Sass
- To improve your design: Diffchecker and PerfectPixel
Hope this helps! Keep coding and have a nice day 😁
Marked as helpful0
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