Packages

@sass/types

1.108.2 · 11 Nov 2026MIT9.5k / weekRepositoryHomepagenpmAtom feed

Your version

1.95.0

8 Dec 2025Where it was published

1.108.2 is the newest release of 1.x.

In short

1 deprecated1 new2 changed

  • Deprecated

    The old Sass if() syntax is now deprecated. Users are encouraged to migrate to the new CSS syntax. if($condition, $if-true, $if-false) can be changed to if(sass($condition): $if-true; else: $if-false).

Release note

To install Sass 1.95.0, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.

Changes

  • Add support for the CSS-style if() function. In addition to supporting the plain CSS syntax, this also supports a sass() query that takes a Sass expression that evaluates to true or false at preprocessing time depending on whether the Sass value is truthy. If there are no plain-CSS queries, the function will return the first value whose query returns true during preprocessing. For example, if(sass(false): 1; sass(true): 2; else: 3) returns 2.

  • Deprecated

    The old Sass if() syntax is now deprecated. Users are encouraged to migrate to the new CSS syntax. if($condition, $if-true, $if-false) can be changed to if(sass($condition): $if-true; else: $if-false).

    See the Sass website for details.

  • Plain-CSS if() functions are now considered "special numbers", meaning that they can be used in place of arguments to CSS color functions.

  • Plain-CSS if() functions and attr() functions are now considered "special variable strings" (like var()), meaning they can now be used in place of multiple arguments or syntax fragments in various CSS functions.

See the full changelog for changes in earlier releases.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.