I am trying to import a mixin in my scss code, but when I do it shows it is not defined. ANd shows an error message. But when I make another scss file named “_mixin.scss” and then import the mixin then it works and does not show any error.
Compilation Error
Error: Undefined mixin.
main.scss
@use "./base";
// @import "./base";
_base.scss
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:[email protected]&family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
box-sizing: border-box;
}
body {
font-family: "Poppins", sans-serif;
margin: 0;
}
@mixin response($break-point) {
@if ($break-point == xl) {
@media (max-width: 1300px) {
@content;
}
}
}