vscode-cssvar icon indicating copy to clipboard operation
vscode-cssvar copied to clipboard

SCSS support if limited

Open phoenisx opened this issue 3 years ago • 0 comments

As postcss-scss parser only parses the syntax and does not evaluate it, some of the SCSS variable might get missed if they are present inside SCSS at-rules. For e.g. the following variables will be skipped by the plugin, because they are never evaluated:

@mixin variables {
  --size-sm: 12px;
  --size-md: 18px;
  --size-lg: 2rem;

  --color-red-50: #ffebee;
  --color-red-100: rgb(255, 205, 210);
  --color-purple-300: hsl(291.25, 46.6%, 59.61%);
  --color-purple-500-alpha: hsla(277.32, 70.17%, 35.49%, 0.67);
}

:root {
  @include variables;
}

Since most of the projects using SASS already uses SASS variables, I am not sure if support for this should be added to this extension, as it adds to complexity and support for the entirety of SASS was never my intention in the first place.

This issue will be reference, and has a very low priority for now.

phoenisx avatar May 21 '22 19:05 phoenisx