Live Sass Compiler throwing error on SASS codeWhat's the difference between SCSS and Sass?Sass .scss: Nesting and multiple classes?Sass Variable in CSS calc() function::-webkit-input-placeholder does not workMultiple cursors in Visual Studio CodeHow do you format code in Visual Studio Code (VSCode)How do I collapse sections of code in Visual Studio Code for Windows?sass interpolation in selector doesn't workHow do I configure Visual Studio Code to open files always in a new tab?Gulp starts sass task but doesn't finish. Compiling doesn't work
If magnesium reacts with oxygen to produce magnesium oxide only on the application of heat, then why isn't it categorised as an endothermic reaction?
Why should universal income be universal?
Why did the EU agree to delay the Brexit deadline?
copy and scale one figure (wheel)
Can Legal Documents Be Siged In Non-Standard Pen Colors?
How did Rebekah know that Esau was planning to kill his brother in Genesis 27:42?
Aragorn's "guise" in the Orthanc Stone
Lowest total scrabble score
It grows, but water kills it
Problem with TransformedDistribution
What does routing an IP address mean?
The IT department bottlenecks progress. How should I handle this?
How do you make your own symbol when Detexify fails?
What does chmod -u do?
Why is it that I can sometimes guess the next note?
What should you do when eye contact makes your subordinate uncomfortable?
Yosemite Fire Rings - What to Expect?
What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?
On a tidally locked planet, would time be quantized?
Is there any references on the tensor product of presentable (1-)categories?
If infinitesimal transformations commute why dont the generators of the Lorentz group commute?
What was this official D&D 3.5e Lovecraft-flavored rulebook?
How can I block email signup overlays or javascript popups in Safari?
Does a 'pending' US visa application constitute a denial?
Live Sass Compiler throwing error on SASS code
What's the difference between SCSS and Sass?Sass .scss: Nesting and multiple classes?Sass Variable in CSS calc() function::-webkit-input-placeholder does not workMultiple cursors in Visual Studio CodeHow do you format code in Visual Studio Code (VSCode)How do I collapse sections of code in Visual Studio Code for Windows?sass interpolation in selector doesn't workHow do I configure Visual Studio Code to open files always in a new tab?Gulp starts sass task but doesn't finish. Compiling doesn't work
While I am learning mixins in SASS, I'm facing an error in the output area:
$bg-prm: #2caddd
$bg-sec: #f3f3f3
$bg-def: #454545
$bg-wht: #fff
@mixin Sans-Serif
font-family: sans-serif
@mixin flex
display: -webkit-flex
display: flex
@mixin bgPrimary
background-color: $bg-prm
color: $bg-wht
body
@include Sans-Serif
.row
@include flex
.bg-prem
@include bgPrimary
Error:
Compilation Error
Error: Invalid CSS after "$bg-prm: #2caddd": expected 1 selector or at-rule, was ""
on line 1 of sass/Users/hassan/Desktop/JS_test/style.sass
>> $bg-prm: #2caddd
---------------^
While in Codepen.io SASS compiler, this code is working.
plugins sass visual-studio-code
add a comment |
While I am learning mixins in SASS, I'm facing an error in the output area:
$bg-prm: #2caddd
$bg-sec: #f3f3f3
$bg-def: #454545
$bg-wht: #fff
@mixin Sans-Serif
font-family: sans-serif
@mixin flex
display: -webkit-flex
display: flex
@mixin bgPrimary
background-color: $bg-prm
color: $bg-wht
body
@include Sans-Serif
.row
@include flex
.bg-prem
@include bgPrimary
Error:
Compilation Error
Error: Invalid CSS after "$bg-prm: #2caddd": expected 1 selector or at-rule, was ""
on line 1 of sass/Users/hassan/Desktop/JS_test/style.sass
>> $bg-prm: #2caddd
---------------^
While in Codepen.io SASS compiler, this code is working.
plugins sass visual-studio-code
add a comment |
While I am learning mixins in SASS, I'm facing an error in the output area:
$bg-prm: #2caddd
$bg-sec: #f3f3f3
$bg-def: #454545
$bg-wht: #fff
@mixin Sans-Serif
font-family: sans-serif
@mixin flex
display: -webkit-flex
display: flex
@mixin bgPrimary
background-color: $bg-prm
color: $bg-wht
body
@include Sans-Serif
.row
@include flex
.bg-prem
@include bgPrimary
Error:
Compilation Error
Error: Invalid CSS after "$bg-prm: #2caddd": expected 1 selector or at-rule, was ""
on line 1 of sass/Users/hassan/Desktop/JS_test/style.sass
>> $bg-prm: #2caddd
---------------^
While in Codepen.io SASS compiler, this code is working.
plugins sass visual-studio-code
While I am learning mixins in SASS, I'm facing an error in the output area:
$bg-prm: #2caddd
$bg-sec: #f3f3f3
$bg-def: #454545
$bg-wht: #fff
@mixin Sans-Serif
font-family: sans-serif
@mixin flex
display: -webkit-flex
display: flex
@mixin bgPrimary
background-color: $bg-prm
color: $bg-wht
body
@include Sans-Serif
.row
@include flex
.bg-prem
@include bgPrimary
Error:
Compilation Error
Error: Invalid CSS after "$bg-prm: #2caddd": expected 1 selector or at-rule, was ""
on line 1 of sass/Users/hassan/Desktop/JS_test/style.sass
>> $bg-prm: #2caddd
---------------^
While in Codepen.io SASS compiler, this code is working.
plugins sass visual-studio-code
plugins sass visual-studio-code
edited Mar 7 at 9:51
Arkellys
971118
971118
asked Mar 7 at 7:35
HassanHassan
63
63
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You seem to mix up SASS ans SCSS syntaxes. In your case, you should declare mixins with = and include them with +:
=Sans-Serif()
font-family: sans-serif
body
+Sans-Serif
You can check the differences between the two syntaxes here.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038369%2flive-sass-compiler-throwing-error-on-sass-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You seem to mix up SASS ans SCSS syntaxes. In your case, you should declare mixins with = and include them with +:
=Sans-Serif()
font-family: sans-serif
body
+Sans-Serif
You can check the differences between the two syntaxes here.
add a comment |
You seem to mix up SASS ans SCSS syntaxes. In your case, you should declare mixins with = and include them with +:
=Sans-Serif()
font-family: sans-serif
body
+Sans-Serif
You can check the differences between the two syntaxes here.
add a comment |
You seem to mix up SASS ans SCSS syntaxes. In your case, you should declare mixins with = and include them with +:
=Sans-Serif()
font-family: sans-serif
body
+Sans-Serif
You can check the differences between the two syntaxes here.
You seem to mix up SASS ans SCSS syntaxes. In your case, you should declare mixins with = and include them with +:
=Sans-Serif()
font-family: sans-serif
body
+Sans-Serif
You can check the differences between the two syntaxes here.
answered Mar 7 at 8:25
ArkellysArkellys
971118
971118
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038369%2flive-sass-compiler-throwing-error-on-sass-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown