Design comparison
Solution retrospective
First time developing with SASS. My main pain point has been to handle media queries. If anyone has feedback to give about my work, or any good resources to train my SASS skills as a beginner, please you're welcome to leave a comment !
Community feedback
- @abe-m1Posted almost 4 years ago
Hi Anne-Sophie, Your solution looks great. For handling media queries, I use the following Mixin below. It lets me pass in a parameter corresponding to the screen size I am targeting, and there are $if statements to determine which media query to apply.
@mixin respond($breakpoint) { @if $breakpoint == big-desktop { @media (min-width: 1800px) { @content; } } @if $breakpoint == desktop { @media (min-width: 1400px) { @content; } } @if $breakpoint == tab-land { @media (min-width: 1200px) { @content; } } @if $breakpoint == tab-port { @media (min-width: 900px) { @content; } } @if $breakpoint == phone { @media (min-width: 600px) { @content; } } }
and to use it:
.class { @include respond(tab-port) { height: 1.5rem; } }
3@annesophie22Posted almost 4 years ago@abe-m1 Thank you very much for your feedback ! I knew I could improve the "management" of my media queries but didn't know how to do it, so what you just gave me will help me a lot. Many thanks
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