Here we go with the latest and most awesome LibSass release ever (so far). First release in 2016 and version 3.3.3 brings us even closer to ruby sass, which is currently at version 3.4.21, and we should be on par as far as our spec tests go. Lots of improvements were done under the hood and will only be visible on the surface with certain edges cases, while a few others will have a more profound impact. If you find differences or other problems, please always check our open issues on github first before opening a new ticket 🔍 📖 🐛 🚑
Parser and rendering refactorings
LibSass is now able to use stringification functions for its internal AST objects whenever its needed. Previously this was only possible when we had access to a context instance, which sometimes made it impossible to invoke the right code path. This tight coupling has been factored out and we can now use these more freely to get our output even closer to ruby sass. Parser now supports multiple operations without parentheses (a > b == c
) correctly and an extensive generated test suite for this feature was added to sass-spec. 👟 😄
Full support for variable arguments
Since the introduction variable arguments in Sass 3.3 LibSass has been playing whack-a-mole with bug fixes. As of this release we should have argument handling compatible with the latest stable Ruby Sass. Thanks to @davidkpiano for his many detailed bug reports and his fantastic sassdash library whose extensive test suite helped make this possible.
Lots of bug-fixes
There were two weeks of ongoing bug slaughtering by @mgreter after new-years eve, which resulted in over 80 closed issues (there are 117 closed github issues in total for this release). @xzyfer also had a good streak with 14 closed issues. Special thanks to @ksmadsen for his c++11 random_device
fix. Also a big thanks for our continuing contributors @am11 and @saper for their inputs, feedback and pull requests 👋 🙇
- Ensure we keep around memory for parser source (@mgreter, #1884)
- Avoid wrong error due to misused map object in At_Rule (@mgreter, #1881)
- Implement css linefeed
\a
handling better (@mgreter, #1880) - Improve parsing for complex number units (@mgreter, #1879)
- Fix potential issue with wrong std container usage (@mgreter, #1878)
- Improve parsing for complex number units (@mgreter, #1877)
- Improve operating on numbers with complex units (@mgreter, #1876)
- Make generating source excerpt on error unicode aware (@mgreter, #1875)
- Improve error handling API (always return formatted json) (@mgreter, #1874)
- Improve identifier schema to include variables (@mgreter, #1872)
- Disable error check for extend placement check (@mgreter, #1870)
- Improve pseudo selector parsing (@mgreter, #1864)
- Fix
each
iteration over selector lists (@mgreter, #1863) - Use
to_sass
for@debug
,@warn
and@error
message (@mgreter, #1862) - Improve lower/upper boundary check error in
for
loop (@mgreter, #1861) - Implement incompatible unit test for interpolation in eval (@mgreter, #1860)
- Implement correct empty list
to_sass
output (@mgreter, #1859) - Remove
To_String
by usingAST->to_string
andinspect
(@mgreter, #1858) - Update license year range to 2016 (@pra85, #1857)
- Incorrect 'Invalid UTF-8' error with a specific input length (@mgreter, #1856)
- Adds include headers to VS meta files on windows (@am11, #1850)
- Implement missing error checks (@mgreter, #1848)
- Fix SmartOS compilation once and for all (@mgreter, #1847)
- Relative imports fail when outside working directory (@mgreter, #1846)
- Disable error for empty source string on context (@mgreter, #1845)
- Fix expression parsing with comment between factors (@mgreter, #1844)
- Refactor/milestone 3.4 (@mgreter, #1841)
@custom-media
throws error (@mgreter, #1839)- Fix iterating over parent selector list with
@each
(@mgreter, #1837) - Include unconditionally (@saper, #1835)
- No file information for empty source string (@mgreter, #1834)
- Improve parsing of media queries with comments (@mgreter, #1833)
- Prevent segfault with nested properties edge case (@mgreter, #1832)
- Implement
extend
for wrapped selectors (@mgreter, #1831) - Only parse interpolations in kept block comments (@mgreter, #1830)
- Implement import recursion check (@mgreter, #1829)
- Error on invalid parent selector placements (@mgreter, #1828)
- Fix look-ahead of parent selector with trailing BEM separator (@mgreter, #1827)
- Fix
join_paths
when left path is not canonical (@mgreter, #1826) - Error incorrectly thrown for
&__
selector (@mgreter, #1825) - Update .editorconfig (@numeraltwo, #1824)
- Ampersand glued to the selector should be rejected (@mgreter, #1822)
- Selector-unify should return null instead of an empty list (@xzyfer, #1819, #1820)
- Fix interpolations returning quoted string in selectors (@xzyfer, #1818)
- Adds CRLF awareness to Util::quote() (@am11, #1817)
- Fix multiple issues with function parameter binding (@xzyfer, #1815)
- While loops should release their local env when exiting early (@xzyfer, #1814)
- Regression in variable scoping causing segfault (@xzyfer, #1813)
- Incorrect output for unknown at-rules (@mgreter, #1812)
- Emit DLL which exports symbols on windows VS (@am11, #1811)
- Add exit code for explicit test (@am11, #1810)
- Support multiline url declarations (@xzyfer, #1809)
- Incompatible units error in interpolations (@mgreter, #1804)
- Segfault on missing semicolon (@mgreter, #1803)
- Infinite import loop results in a stack overflow (@mgreter, #1801)
- Segmentation fault for interpolations in certain comments (@mgreter, #1798)
- Placeholder selector inside :not() (@mgreter, #1797)
- Append function doesn't appear to append correctly inside loops (@mgreter, #1796)
- Media queries fail to parse when comment is present (@mgreter, #1794)
- Incompatible units error for expressions in media queries (@mgreter, #1793)
- Incorrectly building dynamic library on Windows (@mgreter, #1790)
- Fix libsass build for SmartOS (@mgreter, #1782)
- Fix-up some docs on importers (undefined variables) (@asottile, #1780)
- Using 'calc' shoes an Error: Incompatible units: 'px' and '%' (@mgreter, #1776)
- Converts wchar_t* to UTF-8 std::string on windows (@am11, #1774)
- String Interpolation incorrectly quotes parent selectors (@xzyfer, #1770)
@debug
on an empty list should produce () (@mgreter, #1768)- Removing duplicated content from c api example (@rodneyrehm, #1767)
- Comments between binary operands prevents evaluation (@mgreter, #1765)
- Add crutch to help browsers interpreting source-maps (@mgreter, #1759)
- bug with & (parent-selector) and
@each
directive in 3.3.2 (@mgreter, #1757) - Fix possible segfault in
Each
expansion (@mgreter, #1756) - Remove
sixtuplet
flag on Colors and fix edge case (@mgreter, #1755) - Refactor to remove
Context
dependency fromTo_String
(@mgreter, #1754) - Segmentation fault
@each
with argslist node-sass 3.4.2 (@mgreter, #1752) - Wrong line reported in invalid operands for multiplication (@mgreter, #1751)
- Implement variable shadow scoping (@mgreter, #1748)
- Nested styles refer to top-level parent in source-map line number (@mgreter, #1747)
- Variables in control flow should not be accessible in outer scopes (@mgreter, #1746)
- Fix #1742 - same expression on both sides of && (@saper, #1744)
- Don't allocate std::random_device statically (@ksmadsen, #1743)
- Ampersands in :not selector (@mgreter, #1741)
- Improve binary expressions to preserve white-space at operands (@mgreter, #1739)
- Defer creation of hash maps into eval stage (@mgreter, #1736)
- Fix edge-case for extend with
Wrapped_Selector
(@mgreter, #1735) - Interpolated, double-quoted vars can produce an empty output (@mgreter, #1734)
- Fix error messages for
min
andmax
(@xzyfer, #1731) - Multiple nth-child selector with @extend compiles wrong (@mgreter, #1729)
- Fix Binary operators adjacent to interpolations (@mgreter, #1728)
- Allow multiple unparenthesized expressions for operators (@mgreter, #1727)
- Error: Import may not be used within controls or mixins. [$100](@mgreter, #1724)
- Different results with
@each
and@for
loop (@mgreter, #1723) - Extra white-space after "#{}" interpolation (@mgreter, #1722)
- Fixes for Windows version (@Taritsyn, #1721)
@each
on nested lists assigns the wrong value. (@mgreter, #1709)- Avoid some clang compiler warnings (@mgreter, #1707)
- Implement rounding precision (@mgreter, #1704)
- No error for
@extend %an-undefined-placeholder
(@mgreter, #1670) - Error on
@debug
,@warn
or@error
in properties (@mgreter, #1653) - Improve selector look-ahead for "negative" binomials (@mgreter, #1652)
@extend
inside@at-root
doesn't work (@mgreter, #1651)- Space in argument for
:nth-of-type(2n - 1)
results in error (@mgreter, #1650) - All interpolation is unquoted (@xzyfer, #1647)
- Arglist as single arg for varargs improperly gets destructed (@xzyfer, #1645)
- Use the correct parsing semantics for @import url() (@xzyfer, #1597)
- Single comma separated must be surrounded by
()
on inspect. (@mgreter, #1583) - Error message mismatch for empty interpolation as an argument (@mgreter, #1564)
- Error message mismatch for min (@xzyfer, #1559)
- Disallow functions to be defined in control directives or mixins (@mgreter, #1550)
- Minor issue parsing number units after double dash (@mgreter, #1526)
- Fixes some clang warnings (@mgreter, #1523)
- Better support for @-moz-document (@mgreter, #1401)
- Quoted colors in maps produces 'Duplicate key "transparent" in map' (@mgreter, #1169)
- Permit multiline in URL (@xzyfer, #1096)
- No error for missing imported base class in
@extend
(@mgreter, #871)
Improved spec tests
With this release we have a bit more than 275 new spec tests. We started to include error tests too, which was quite difficult at the beginning, since we need to get the output 100% correct to really pass a spec test, although we really only test the first line for error specs so far. None the less, with this release a lot more error messages are matching the ones of ruby sass and we also catch more cases. But we still let a lot more syntax silently pass than ruby sass does.
Upcoming version 3.3.4
We plan to do at least an additional 3.3.4 release which should include the last missing features for the C-API. Version 3.4.0 is our next window to introduce breaking API changes and I already can say that it will probably only touch the experimental API part. Other than that we are pretty much down to only a handful of open issues and can hopefully close a few of those for the next version, which is currently scheduled for March (without any guarantee of course).