github sass/libsass 3.3.0
Grease lightning

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

Today we release the long awaited 3.3 stable, which once again tops our last major releases in terms of commits and fixed bugs. Good news for all implementors is that we only did some minor changes on the C Interface, and all of them only touch the still experimental features like custom importers and headers.

Main new features for this release are a completely refactored parent selector ('&') and we finally have all selector functions implemented. It also contains some big refactorings for the parser and for the evaluation phase. This fixes some major performance problems with tight loops and also adds some decent performance improvements in general (we would love to get some real world numbers from our users).

With this release we're rapidly reaching 100% feature parity yet. There will be a long tail of minor bugs between now and 3.4, but the base work for all main features is done. We now need all of you to help and open issues to find the missing details and to improve our test suite!

By the numbers!

368 commits
260 files changed
274 closed issues
13 contributors
604 new tests passing
62% less skipped tests

News

We're also happy to welcome @saper to the LibSass core team!
He's been an incredible asset and we couldn't have come this far so quickly without him.

Acknowledgements

As always we want to thank our beloved contributors who breathe life into this piece of code. ❤️
@am11, @djensen47, @drewwells, @ekskimn, @mgonzalez999, @tysongach, @driekus77, @una, @unmole and everyone who opened issues. Without your contributions we wouldn't be where we are today.
We (@mgreter, @xzyfer, @saper, @hcatlin) hope you all will enjoy this release 🚀

Changelog

Selector functions

We now implement all 3.4 selector functions. This massive effort was initially booted by @ekskimn, @mgonzalez999 and was finished and polished by @mgreter with a major refactoring in how selectors are parsed and evaluated, which was the ground work for the parent selector refactoring.

Shadow DOM support

We now correctly support /deep/ reference combinators thanks to @mgreter

Performance improvements

In order to fix some of the trickier long standing bugs, another major internal refactoring was required. This turned out to be very tricky, as pretty much all layers of LibSass were involved. @mgreter was up for the challenge and consequently closed a swath of outstanding issues. As a bonus the improved parser gave us an impressive speed boost. You should see the biggest gains with tight loops.

This branch also includes quite a few performance optimisations.
It brought my sass-spec test suite runtime from 27s down to 7s!

C-API breaking changes

This release includes the new function sass_value_op that implementers can use to access all internal value operations. This enables implementers to have the same operations in their bindings as LibSass .

There was another minor refactoring for custom importer. We renamed two API functions to be more close to their actual use (@mgreter, #1509):

  • sass_import_get_path -> sass_import_get_imp_path
  • sass_import_get_base -> sass_import_get_abs_path
  • Moved C-API library headers into the sass subfolder (@mgreter, #1360)
  • Pass Sass_Compiler* to custom function signature (@mgreter, #1617)

Improvements to url()

After many bug fixes @xzyfer has started overhauling the url() implementation to closer match the Ruby Sass implementation (#675).

Documentation

Thanks to the hard work of @drewwells and @una the wiki has been converted to markdown and added to the docs/ folder (#1234). This will help us, and our contributors, keep the docs up to date moving forward!

Fixes

Improvements to the parser

  • Fix incorrectly parsing declarations without semicolons (@xzyfer, #1610)
  • Fix incorrectly parsing named arguments after unnamed arguments (@xzyfer, #1579)
  • Fix incorrectly parsing font shorthand values (@xzyfer, #1570)
  • Fix incorrectly parsing media queries with comments (@xzyfer, @1567)
  • Fix incorrectly parsing comments in declarations (@mgeter, #1568)
  • Fix sass2scss sometimes producing incorrect output for @include (@xzyfer, #1547)
  • Fix incorrectly parsing - as a minus operation (@mgreter, #1486)
  • Fix incorrectly erring with interpolants in feature queries (@xzyfer, #1425)
  • Fix incorrectly erring with comment in declaration value (@xzyfer, #1422)
  • Fix incorrectly not ignoring the space following a CSS escape sequence (@mgreter, #1419)
  • Fix incorrectly parsing identifiers with units (@mgreter, #1405)
  • Fix multiple - in indentifiers sometimes being merged (@mgreter, #1404)
  • Fix interpolations in propset being ignored (@mgreter, #1393)
  • Fix functions calls followed by an interpolant being treated as String(@mgreter, #1333)
  • Fix incorrectly erring with @import with media queries (@mgreter, #1323)
  • Fix incorrectly erring with variables and interpolants in media queries (@mgreter, #1322)
  • Fix crashing with some number units (@mgreter, #1307)
  • Fix incorrectly erring with classnames with interpolants starting with - (@mgreter, #1301)
  • Fix incorrectly erring with multiplication with interpolants (@mgreter, #1291)
  • Fix incorrectly erring with interpolated values in Lists (@mgreter, #1277)
  • Fix incorrectly erring with unknown @at-rules (@mgreter, #1263)
  • Fix incorrectly erring with named arguments Varargs (@mgreter, #1259)
  • Fix incorrectly evaluating variables in @at-rules (@mgreter, #1253)
  • Fix incorrectly erring with parsing some @at-rules (@mgreter, #1214)
  • Fix incorrectly erring with division with interpolants (@mgreter, #948)
  • Fix incorrectly erring with comments inside selectors (@mgreter, #941)

Improvements to character escaping

Improvements to Varargs, Restargs and Arglists

  • Fix Varags that are lists sometimes being lost (@xzyfer, #1604)
  • Fix incorrect coercion of rest arguments (@xzyfer, 1566)
  • Fix difference when using Varargs with @each (@mgreter, #1440)
  • Fix incorrectly erring with empty Arglists as a required parameter (@mgreter, #1305)
  • Fix crash when using an Arglist as a List (@mgreter, #1269)
  • Fix crash when using an Arglist as the only argument (@mgreter, #1257)
  • Fix crash when using set-nth with Arglists (@mgreter, #1255)
  • Fix Varags that are lists sometimes being flattened (@mgreter, #1171)

Improvements to &

Improvements to url()

  • Fix incorrectly unquoting variables url() (@mgreter, #1480)
  • Fix variable not being evaluated in url() (@mgreter, #1370)
  • Fix incorrectly erring with protocol relative urls in a url() (@mgreter, #1298)
  • Fix incorrectly erring with interpolating a function in a url() (@mgreter, #1273, #1438)

Improvements to insignificant whitespace CSS output

  • Fix insignificant whitespace being outputted with binary operations in media queries (@mgreter, #1398)
  • Fix insignificant whitespace being outputted when curly braces are on new line (@mgreter, #1448)
  • Fix insignificant whitespace being outputted with multi-line property lists (@mgreter, #1230)
  • Fix insignificant new lines not being removed in nested output (@mgreter, #1061)

Improvements to @extend

  • Fix selectors sometimes being dropped when @extending multiple attribute selectors (@xzyfer, #1574)
  • Fix selector specificity with deep @extends (@mgreter, #1248)
  • Fix selectors sometimes being dropped when extending inside loops (@mgreter, #1029)

Improvements to erring messages

  • Fix poor error message formatting for long lines (@xzyfer, #1575)
  • Fix missing error with is-superselector("foo", null) (@saper, #1571)
  • Fix poor error message for simple-selector(null) (@saper, #1571)
  • Fix error message capitalization (@saper, #1558)
  • Fix poor error message for missing closing brace (@mgreter, #1506)
  • Fix erring messages sometimes showing weird characters (@mgreter, #1496)
  • Fix missing error with binary operations on Strings (@mgreter, #1451)
  • Fix missing error with calling a function with missing named arguments (@mgreter, #1418)
  • Fix missing error when passing a block into a mixin without @content (@mgreter, #1487)
  • Fix missing error with @return; (@mgreter, #1355)
  • Fix missing error when outputting a Map to CSS (@mgreter, #1246)
  • Fix missing error with #{} (@xzyfer, #1093)

Improvements to the C API

  • Fix path inconsistencies with get_included_files (@mgreter, #1040)
  • Made source_map_embed independent of source_map_file (@mgreter, #885)

Improvements to Visual Studio support

  • Fix extern "C" functions throwing exceptions in Visual Studio (@saper #1521)
  • Fix include guard condition for Visual Studio 2015 (@am11 #1495)
  • Remove now unnecessary NOMINMAX macros (@am11 #1454)
  • Fix crashing with invalid @warn input in Visual Studio (@mgreter, #1460)
  • Fix crashing with invalid input in with Visual Studio (@xzyfer, #1443)
  • Fix compiler warnings in Visual Studio (@driekus77, #1375)

Misc

Don't miss a new libsass release

NewReleases is sending notifications on new releases.