Design comparison
Solution retrospective
Hello everyone,
In this challenge, I've spent many hours to make responsive images. I've used <picture> tags with different sources. But I would like to know the best method for reducing the loading time ? Should I use srcset on an unique <img> ? Or different <img> tags which I can display: none/initial; with media queries ... ?
Moreover, I tried to organise SCSS files. Is it well done ?
Every review is welcome ! Thanks
Community feedback
- @MikeBish13Posted over 3 years ago
Site looks good. Spotted a few things after a quick glance:
- Your font color for the headings is black instead of the navy from the design
- I think you've approached the responsive images the right way - using display - block/none isn't best practice as the images will still be present in the HTML for screen readers etc
- Your folder structure is tricky to follow as you have test files still present. I'd suggest having all CSS/SCSS files in a single directory. I'd maybe consider separate files for typography and components, such as buttons and card, and maybe a separate folder for layout specifics, such as the header and footer. Not essential for this project but it's a good habit to get into when you come to building larger sites. I'd also consider creating a mixin for your media queries - I find this much easier to insert into the code at specific points, rather than having a big block of code at the bottom for the media queries. Helps a lot for debugging too.
I've just submitted my solution if you wanted to take a look at how I approached it.
2@SuleeymanPosted over 3 years ago@MikeBish13 Thanks for those tips. I think like you about SCSS files in a single directory but as you say, I'm trying to get habit for larger sites.
And your approach on media queries with mixins and conditions, I think i'll use it in my next challenge.
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