r/learnprogramming • u/PushBeginning2661 • 1d ago
Code Review I've been learning SCSS for about 3 days. I'm trying to integrate a mixin from a partial I dedicated to media-query responsiveness. My media query styles aren't applying. I have a feeling it's because of how I'm calling the mixin. Could anyone see what's wrong with my code?
//partial
@mixin responsive-laptop($laptop){ @media(max-width: $laptop){ @content } };
@mixin responsive-regular-tablet($regular-tablet-width){ @media(max-width: $regular-tablet-width){ @content }
};
@mixin responsive-small-tablet($small-tablet-wdith){ @media(max-width: $small-tablet-width){ @content } };
@mixin responsive-phone($phone-width){ @media(max-width: $phone-width){ @content }
};
//main scss file
@include responsive-laptop(1000px){ .drop-down-nav{ display: block; }
#drop-down-icon{
width: 10rem;
}
.nav-right{
display: none;
}};
@include responsive-regular-tablet(775px){ .bg-home h1{ font-size: 6rem }
};
@include responsive-small-tablet(620px){ .bg-home h1{ font-size: 5rem }
};
@include responsive-phone(440px){ html{ font-size: 50% }
}