KEMBAR78
[SCSS] Syntax Error when `!important` as arguments of Method · Issue #57 · microsoft/vscode-css-languageservice · GitHub
Skip to content

[SCSS] Syntax Error when !important as arguments of Method #57

@liuderchi

Description

@liuderchi

VSCode underlines error at !important syntax when it's argument of method if:

@function get-mixin-important-var($important) {
  @return if($important, !important, null);
//                      ~~~ Error: expression expected
}
@mixin heading($important: false) {
  $i: get-mixin-important-var($important);
  font-family: "arial" $i;
}

.heading {
  @include heading(true);
}

However this snippet is valid when pasted to SASS Online Editor (https://www.sassmeister.com/) with option

  • Sass compiler: v3.3.14
  • Syntax: SCSS

And it's compiled to valid CSS:

.heading {
  font-family: "arial" !important;
}

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions