Skip to content

Releases: wkillerud/some-sass

January 2023

04 Feb 12:59
a3b2acf
Compare
Choose a tag to compare

What's Changed

  • fix: read modern color formats in completions by @wkillerud in #29
  • feat: resolve the base value behind variables by @wkillerud in #30

Some housekeeping

Full Changelog: 2.8.0...2.9.0

Rename symbol

26 Dec 20:16
eda5032
Compare
Choose a tag to compare

What's Changed

Rename symbol

The headline feature is the implementation of Rename symbol support for variables, functions and mixins.

If you use @forward prefixes, only the base un-prefixed part of the symbol name will be renamed.

Rename.symbol.mp4

Bugfixes

  • fix: don't include all parameters of mixin/function in references, only the one we're after by @wkillerud in #28
  • fix: include forward visibility references (hide) for mixins and functions by @wkillerud in #28
  • fix: go to definition works for mixins and functions when used in forward visibility (hide) by @wkillerud in #28

Full Changelog: 2.7.1...2.8.0

Fix for completions where SassDoc type was undefined

22 Dec 16:19
18189ba
Compare
Choose a tag to compare

What's Changed

  • fix: completions don't crash if SassDoc type is undefined by @wkillerud in #26

Full Changelog: 2.7.0...2.7.1

Refactor: Extract

10 Dec 18:10
4431082
Compare
Choose a tag to compare

What's Changed

Available when you have an active selection. Pick between extracting to a variable, function or mixin.

See the Refactoring chapter of the VS Code documentation to see how to use this feature.

Full Changelog: 2.6.4...2.7.0

2.6.4 - Colors!

09 Nov 17:38
Compare
Choose a tag to compare

What's Changed

Screenshot from VS Code showing a list of SCSS variable suggestions with color previews

  • Fix color previews in code suggestions (#24)
  • Dependency updates (#23, #24)

Full Changelog: 2.6.3...2.6.4

2.6.3

10 Sep 09:30
56374d0
Compare
Choose a tag to compare

What's Changed

  • fix: update files on branch change by @wkillerud in #21
  • fix: resolve the real path to links in the parser for immediate updates in monorepos by @wkillerud in #22

Full Changelog: 2.6.2...2.6.3

2.6.2

14 Aug 17:36
055664a
Compare
Choose a tag to compare

What's Changed

  • fix: avoid call stack overflow if the current file links to itself
  • fix: code completion in string interpolations with preceding non-space characters (--negative-font-size: -#{ns.$font-size-1})
  • fix: code completion in @return statements with expressions (@return $var * math.$pi)
  • fix: code completion on the right side of a multiplication
  • fix: include any parameter SassDoc in function/mixin signature helper popup

Full Changelog: 2.6.1...2.6.2

2.6.1

10 Aug 17:48
b3d7360
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.6.0...2.6.1

Web Extension

08 Aug 17:43
33bb60a
Compare
Choose a tag to compare

What's Changed

  • feat: web extension support
  • fix: display bug for SassDoc @see

Web Extension

Big changes under the hood made it possible to have Some Sass run as a web extension. In short, you can now use Some Sass on vscode.dev, github.dev, or anywhere else you might find Visual Studio Code in the browser.

Here we can see a familiar SassDoc preview while browsing through code over at github.dev/fylgja/fylgja.

web_extension.mp4

What's shipping

Almost everything should work as you expect from the desktop version:

  • Full support for @use and @forward.
  • Smart module-based code completion.
  • SassDoc previews and authoring tools (generate SassDoc blocks, annotation completions and hover info).
  • Go to Definition.
  • Documentation and completions for Sass built-in modules.
  • And probably more that I'm forgetting.

One known limitation is that since node_modules is not available in the browser, these features will only work on code in the project.

How to get it

Depending on your setup (whether you are logged in with Setting Sync or not), you may need to go to the Extension Marketplace and install Some Sass manually. Once installed, you may need to:

  • Close and reopen an SCSS-file (or a Vue, Svelte, or Astro file)
  • Reload the browser window

Depending on the workspace size as well, Some Sass may need a few seconds to initialize.

Other changes

This release doesn't have that much new for users of the regular desktop version.

If you use the @see annotation in SassDoc, this release fixes a bug where it would show as [object Object] on hover. (21b359a)

Full Changelog: 2.5.0...2.6.0

2.5.0 - Astro

30 Jul 10:08
Compare
Choose a tag to compare

What's Changed

Here's a quick summary of the changes in this version:

  • feat: add support for SCSS in Astro
  • feat: suggest choices for parameters documented with SassDoc where the parameter type is a TypeScript-like string literal union type
  • fix: code suggestions no longer include optional parameters by default
  • fix: code suggestions now work inside #{interpolation} when using namespaces
  • fix: code suggestions inside Vue and Svelte (and now Astro) no longer add a duplicate $ for variables, or . when using namespaces
  • docs: add tip about configuring Emmet when using Vue, Svelte or Astro

Add support for Astro

Now you can get all the niceties of Some Sass when you write your styles in Astro.

Along with support for this somewhat familiar component syntax, this version ships bugfixes for some pretty annoying details in code completion when inside a Vue or Svelte file. The number of extra $ and . signs should now be greatly reduced.

astro_demo.mp4

Use SassDoc to suggest choices

If you use SassDoc (which I wholeheartedly recommend), this version adds a new feature to code suggestions.

Let's say you have a function or mixin that expects only a set of string values. You might document it this way with a string literal union type.

/// Get a timing value for use in animations.
/// @param {"sonic" | "link" | "homer" | "snorlax"} $mode - The timing you want
/// @return {String} - the timing value in ms
@function timing($mode) {
    @if map.has-key($_timings, $mode) {
        @return map.get($_timings, $mode);
    } @else {
        @error 'Unable to find a mode for #{$mode}';
    }
}

Now Some Sass understands that type annotation and uses it to give the user of the function or mixin a list of choices from that type.

choices_demo.mp4

Other changes

When a function or mixin has optional parameters Some Sass now suggests two variations in code completion:

  1. Higher ranked: the function or mixin without optional parameters.
  2. Lower ranked: the function or mixin with all parameters.

If you want the full parameter list, hit Arrow key down.

Finally, this version fixes a bug in #{interpolation}. Now namespaces work as you would expect, so you can finally get suggestions when you make CSS variables from SCSS constants.

Full Changelog: 2.4.0...2.5.0