github sass/libsass 3.2.0
Spring Clean

latest releases: 3.6.6, 3.6.5, 3.6.4...
9 years ago

Today we're marking the completion of the biggest Libsass release to date!

The core developer team kept the pace high fixing a ton of open issues, while also refactoring large amounts of code, implementing a handful of new major features, and even some performance improvements to boot!

The sheer amount of features, fixes and refactors introduced quite a few regressions delaying this release. We want to thank all the people that reported issues, patches or contributed in any other form, that made this release happen 👏

By the numbers

  • 108 closed issues
  • 357+ new sass specs (including new output type)
  • 1.047+ new assertions
  • 8% increase in code coverage

Major new features

Output styles

The way Libsass outputs the final css was refactored to make the code more modular. This allowed us to add the missing compact and expanded output styles. This refactor also allows us to produce more accurate nested and compressed output styles (@mgreter, #910).

We updated our spec suite to support all output styles which added nearly 3,400 runs and 10,000 new assertions.

Strings and interpolation

String and interpolation parsing and evaluating was refactored too, which brings Libsass even closer to Ruby Sass in terms of output styles now (@mgreter, #847).

Sourcemaps

The refactoring work on strings, interpolations and output styles made it a lot easier to guarantee the correctness of the generated sourcemap files (@mgreter, #879)

Directive bubbling

@media, @supports, @keyframes directives (and more!) are correctly bubbled so you always get CSS 2.0 compliant output.

This means @media rules will be "combined" with all bubbled up @media rules to better reflect the Ruby Sass behaviour (@xyfer, #800, #821).

@at-root

Full support for the @at-root directive has been implemented (@xyfer, #799, #859).

& in SassScript

Partial support for & in SassScript (@ekskimn, #966, #548)

& can now be used a css property or passed as an argument to functions and mixins.

Variable scope

Full support for !global variable scoping has been implemented (@mgreter, #986, #990)

New experimental feature

This release contains initial (and experimental) support to load 3rd party plugins in the form of precompiled .dll (win) or .so (nix) files. We really would like to see some people playing around with this new toy. It could help us determine what we actually want to do with this technology! (@mgreter, #919)

Breaking changes

  • Change in sass_make_data_context - libsass now really takes memory ownership (#925)
  • Hard deprecated image-url and compact functions (throw errors until removed) (#834, #835)

Changes in C-API

  • Implement error status for importer entries (#926)
  • Breaking change in sass_make_data_context (#925)
  • Add char* indent and char* linefeed to options (#787)
  • Add string_list* plugin_paths to options (#919)
  • Add char* plugin_path to options (#919)
  • Add char* source_map_root to options (#926)
  • Add char* error_text to options (#915)
  • Add sass_option_push_plugin_path function (#919)
  • Remove char* image_path from options (#834)
  • A few source files have been added and some removed

Improved spec tests

Due to the new support for all output styles, the spec tests have been enhanced to test all four output styles. The tests are now much more white-space sensitive than before, as only multiple line-feeds are normalized. This should ensure that libsass gets and stays closer to the exact output of ruby sass in the future.

Minor features

Fixes

Known issues

  • Still some @extends edge cases - (#1029, #1063, #1091)
  • Interpolating & in selectors with @at-root produces incorrect output - (#1043)
  • Interpolating & in attribute selectors doesn't work - (#1016)

Thanks!

A huge thanks to everyone who reported issues 🔆 !!
Honourable mentions to @am11, @anlutro, @asottile, @candid, @chriseppstein, @ekskimn, @hcatlin, @hugogiraudel, @lunelson, @mgreter, @mmaxim, @npiguet, @rodneyrehm, @saper, @Snugug and @xzyfer for their contributions to Libsass and Sass spec that made this release possible.

What's next?

With this release we've hit 97% feature parity with Ruby Sass according to sass-compatibility.github.io.

There are no signs of slowing down! We already have a bunch of features queued for 3.2.1.

Don't miss a new libsass release

NewReleases is sending notifications on new releases.