liuderchi / ide-css

:atom: Atom-IDE for CSS, LESS and SCSS language

Home Page:https://atom.io/packages/ide-css

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

!important rules in scss logic are showing as errors.

pixilz opened this issue · comments

commented

Atom: 1.23.0
ide-css: 0.2.0

My code is compiling and working as expected but is being marked with errors.

I have the following SCSS code:

/**
 * This file contains mixins that are only applicable to the styleguide.
 */

@function get-mixin-important-var($important) {
	//If important is true it will add an important tag to everything.
	@return if($important, !important, null);
}

The error underlines directly underneath the !.

IDE-CSS is reporting
image

Example Usage:

@mixin heading($important: false) {
	$i: get-mixin-important-var($important);

	font-family: 'arial' $i;
	font-weight: 600 $i;
        color: #000 $i;

	font-size: 16px $i;
}

.heading {
      @include heading(true);
}

<div class="heading">My Heading</div>

Output CSS from example:
image

Pin for example

@pixilz Thanks for your report.

IMO this issue is related to the css language server (or its service).
I am under a survey/experiment and will report it to correct repo.


Update (Dec. 24): issue created at microsoft/vscode-css-languageservice#57

Update (Jan. 24): PR fixing this is merged

Update (Mar. 20): merged PR is released in v3.0.5.

@pixilz latest PR has been released at v0.3.0.
Please upgrade ide-css and hopefully this issue will be solved.