Today we release the long awaited 3.3 RC1, 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).
We do not have 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!
305 commits
180 files changed
107 closed issues
9 contributors
544 new tests passing
62% less skipped tests
Acknowledgements
As always we want to thank our beloved contributors who breathe life into this piece of code. ❤️
@am11, @djensen47, @drewwells, @ekskimn, @mgonzalez999, @saper, @tysongach, @driekus77 and everyone who opened issues. Without your contributions we wouldn't be where we are today.
We (@mgreter, @xzyfer, @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
We also moved C-API library headers into the sass
subfolder (@mgreter, #1360)
Fixes
Improvements to the parser
- 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
- Fix incorrectly parsing escape sequences (@mgreter, #1492)
- Fix incorrectly escaping apostrophes in Strings with interpolants (@mgreter, #1295)
- Fix incorrectly escaping in Strings with interpolants (@mgreter, #1115, #1231, #1271)
Improvements to Varargs, Restargs and Arglists
- Fix Varags that are lists sometimes being flattened (@mgreter, #1171)
- Fix difference when using Varargs with
@each
(@mgreter, #1440) - 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 incorrectly erring with empty Arglists as a required parameter (@mgreter, #1305)
Improvements to &
- Fix crashing with
& {}
(@mgreter, #1524) - Fix crashing when using
&
with@extend
(@mgreter, #1519) - Fix outputting incorrect selectors when using
&
with@extend
(@mgreter, #1482) - Fix second selector omitted when using
& + &
(@mgreter, #1441) - Fix duplicating parts of selectors when using
&
as a List (@ekskimn, #1304) - Fix incorrectly erring with
&
being used as an argument (@mgreter, #1260) - Fix incorrectly erring with
&
selector in@at-root
(@mgreter, #1043, #1210) - Fix incorrectly erring with
&
being used as string (@mgreter, #1170)
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 selector specificity with deep
@extend
s (@mgreter, #1248) - Fix selectors sometimes being dropped when extending inside loops (@mgreter, #1029)
Improvements to erring messages
- Fix poor erring message for missing closing brace (@mgreter, #1506)
- Fix erring messages sometimes showing weird characters (@mgreter, #1496)
- Fix missing erring with binary operations on Strings (@mgreter, #1451)
- Fix missing erring with calling a function with missing named arguments (@mgreter, #1418)
- Fix missing erring when passing a block into a mixin without
@content
(@mgreter, #1487) - Fix missing erring with
@return;
(@mgreter, #1355) - Fix missing erring when outputting a Map to CSS (@mgreter, #1246)
Improvements to the C API
- Fix path inconsistencies with
get_included_files
(@mgreter, #1040) - Made
source_map_embed
independent ofsource_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
- Fix floating point rounding (@mgreter, #1514)
- Fix sourcemap path resolution on Windows (@mgreter, #1500)
- Fix Arglist sometimes having the wrong type (@mgreter, #1488)
- Fix compilations warnings on OSX with Clang (@xzyfer, #1461)
- Fix outputting unicode ranges sometimes removes the
+
(@mgreter, #1459) - Fix media queries with only CSS comment as content not being outputted (@mgreter, #1437)
- Fix falsey Map keys being silently dropped (@mgreter, #1416)
- Fix incorrectly outputting consecutive Strings, quoted Strings and interpolants (@mgreter, #1413 #1396)
- Fix difference when outputting quoted Strings in binary operations (@mgreter, #1399)
- Fix difference when outputting interpolated function calls (@mgreter, #1397)
- Fix whitespace being lost when joining escaped literals (@mgreter, #1394)
- Fix
Null
values in Lists not removed when converted to Strings (@mgreter, #1376) - Fix possible stack overflow by recursive call (@mgreter, #1361)
- Fix handling of percentage values in
rgb()
andrgba()
(@mgreter, #1332) - Fix @debug incorrectly outputting Maps with
null
keys (@xzyfer, #1331) - Fix sometimes outputting
\a
between selectors (@mgreter, #1328) - Fix compilation errors with SmartOS/Solaris (@djensen47, #1308)
- Fix dropping parts of selectors when using
@at-root
with interpolants (@mgreter, #1297) - Fix ignoring
@at-root
inside loops (@mgreter, #1285) - Fix clashing Map keys when using Lists (@mgreter, #1283)
- Fix treating named Colors as Strings (@mgreter, #1281)
- Fix quoting some strings (@mgreter, #1207 #1258 #1279)
- Fix processing
@import
s breadth-first (@mgreter, #1262) - Fix producing duplicate selectors
@at-root
sometimes (@mgreter, #1236)