Answer the question
In order to leave comments, you need to log in
Why doesn't node-sass convert to css?
I convert node-sass, the mixin interferes, but if you convert through the plugin to vscode, it works fine and converts to a css file.
sass file:
@mixin adaptiv-font($pcSize, $modSize) {
$addSize: $pcSize - $modSize;
$addModSize: $addSize + $addSize * 0.7;
@media (max-width: 767px) {
font-size: calc(#{$modSize + px} + #{$addModSize} * ((100vw - 320px) / #{$maxWidth}));
}
@media (min-width: 767px) {
font-size: calc(#{$modSize + px} + #{$addSize} * (100vw / #{$maxWidth}));
}
}
.logo-text {
margin-left: 15px;
margin-right: 20px;
text-transform: uppercase;
@include adaptiv-font(50, 1);
font-weight: 600;
}
Wrote CSS to G:\Belart\Git\Moving-New-Jersey\css\style.css
=> changed: G:\Belart\Git\Moving-New-Jersey\scss\style.scss
{
"status": 1,
"file": "G:/Belart/Git/Moving-New-Jersey/scss/main-style.scss",
"line": 20,
"column": 94,
"message": "Undefined variable: \"$maxWidth\".",
"formatted": "Error: Undefined variable: \"$maxWidth\".\n on line 20 of scss/main-style.scss, in mixin `adaptiv-font`\n from line 17 of scss/style.scss\n>> dSize} * ((100vw - 320px) / #{$maxWidth}));\r\n ------------------------------------------^\n"
}
Answer the question
In order to leave comments, you need to log in
I overlooked the $maxWidth variable, as Mikhail @notiv-nt already said in the comments
"message": "Undefined variable: \"$maxWidth\".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question