@Mary2021
Posted
Nicely accompliced solution, Eugene! I like the clean and simple structure of your Sass code.
Found couple of good sites explaining html picture element:
- Better responsive images with picture element
- How to Use HTML5 “picture”, “srcset”, and “sizes” for Responsive Images
I find especially handy, that its possible to add different images for instance tablet(landscape/1200px) and desktop(portrait/1200px).
<picture>
<source media="(orientation: landscape)" ... />
<source media="(orientation: landscape) and (min-width: 1200px)" ... />
</picture>
I fond a little bug in your solution. In mobile view content is longer than class main (home.module.scss) height. It resolved when removing the height property.
.main {
height: 100vh;
...
}
Marked as helpful