Releases: sass/libsass
Elbow Patched Suit
This release is a follow up to 3.2.1 addressing some issues we felt couldn't wait for our next major release.
Features
- error when max stack depth is exceeded (@carsonmcdonald, #1157)
Fixes
- remove all traces of
compact
once and for all (@xzyfer, #1156) - add missing C-API function declarations for
is_quoted
(@mgreter, #1154)
Thanks!
Big thanks to @carsonmcdonald!
Patchwork quilt
This release is a follow up to 3.2.0 addressing some issues we felt couldn't wait for our next major release.
Most notably it fixes a regression in url()
s that contain unconventional characters like in the cause of Google web fonts.
Features
Fixes
- fix
str-slice
function to work with utf8 strings (@mgreter, #1047) - fix mathematical operations with different units (@mgreter, #1049)
- fix error registering a custom function named
compact
(@mgreter, #1055) - fix order of
@imports
and comments at the top of a file (@mgreter, #1080) - fix trailing 0s integers being trimmed from integers with precision is 0 (@xzyfer, #1140)
- fix missing header causing compilations issues in some environments (@xzyfer, #1144)
- fix regression in
url()
s (@mgreter, #1145 #1146)
Spring Clean
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
andcompact
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
andchar* 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
- Implement raw css imports (@mgreter, #754, #318)
- Implement number prefix parsing (/[+-]+/) (@mgreter, #535)
- Improve source-mapping implementation (@mgreter, #792)
- Improve handling of negative numbers (@xyfer, #828)
- Add support for -ms-calc (@xyfer, #842)
- Add an example plugin (@mgreter, d3de957)
- Add Visual Studio file to .gitignore (@am11, #944)
- Fully evaluate nested binary operations (@xyfer, #770)
- Normalize CSS function string arguments (@xyfer, #817)
- Made linefeed and indent configurable (@mgreter, #787)
- Speed up Windows CI build times (@am11, #944)
- Update number function signatures (@xyfer, #826)
- Simplify autotools build (@saper, #992)
- Performance improvements in parser (@mgreter, #985, #990)
- Provide a formatted error output (@mgreter, #938)
- Add sass_context_take_included_files() (@rodneyrehm, #982)
- Support multiple importers (alpha, @mgreter, #1000, #962)
- Custom headers (experimental, @mgreter, #1000, #960)
- Implement /deep/ shadow DOM selector (@mgreter, #452)
- Enable
@extend
ing selector groups (@mgreter, #950) - Enable OS-X CI testing via Travis (@mgreter, #1024)
- Enable url function overloading (@mgreter, #1010, #674)
- Add
units-level-3
andat-error
feature flag (@xyfer, #1011, #1013)
Fixes
- Fix parsing of dash in declaration values (@xyfer, #733)
- Fix math operations sometimes returing wrong units (@xyfer, #783)
- Fix str-slice returning incorrect value when $end-at is omitted (@xyfer, #815)
- Fix arguments sometimes being passed by value not reference (@xyfer, #813, #909)
- Fix segfault if a function definition has a css comment (@xyfer, #646)
- Fix
@charset
not being output if utf8 characters are in top comment (@mgreter, #820) - Fix error message line numbers drifting with indented style (@anlutro, #866)
- Fix desaturation of greyscale colours (@anlutro, #864)
- Fix crash in Parser::parse_term (@mmaxim, #846)
- Fix greedy not operator (@xyfer, #873, #897, #920, #934)
- Fix function names not consistently normalized (@xyfer, #877)
- Fix color related issues in functions (@mgreter, #911)
- Fix dash parsing after other tokens (@mgreter, #922)
- Fix interpolation in media queries (@mgreter, #346)
- Fix comments on in propsets causing segfaults (@xzyfer, #901)
- Fix relative path issue on Window (@mgreter, #939)
- Fix relative path issue with Source Maps (@am11, #964)
- Fix memory management issues (@mgreter, #940)
- Fix block comment parsing regression (@mgreter, #941)
- Fix @error to exit with error message (@asottile, #967)
- Fix reported position when no token can be parsed (@mgreter, #972)
- Fix variable length parameter (@mgreter, #980)
- Fix regression with str-slice (@mgreter, #988)
- Fix allowing illegal extend error across media-queries (@mgreter, #943)
- Fix error parsing comments in propsets (@xyfer, #890)
- Fix error message line numbers drifting (@mgreter, #533, #972)
- Fix error on illegal parent selectors in root blocks (@mgreter, #325)
- Fix error on illegal media blocks extending (@mgreter, #317, #712)
- Fix error on multiline string with trailing backslash (@mgreter, #942)
- Fix error when property-value is missing (@mgreter, #945)
= Fix edge case in Parent_Selector evaluation (@mgreter, #1004) - Fix build to copy sass_version header (@drewwells, #998)
- Fix
&
interpolation causing segfaults (@mgreter, #978) - Fix wrong line in error message (@mgreter, #972)
- Fix variable Interpolation in @Keyframe (@mgreter, #947)
- Fix tabs when bubbling feature blocks (@mgreter, #1044)
- Fix white-space issue with wrapped selectors (@mgreter, #1025)
- Fix bug in C-API with context compiler status (@mgreter, #1038)
- Fix
@extend
specificity problems (@mgreter, #592) - Fix parsing of another missed block comment (@mgreter, #1021)
- Fix parsing of some more missed block commen (@mgreter, #1007)
- Fix dynamic exception as per C++11 specs. (@am11, #1006)
- Fix argument handling for dynamic
call
function (@mgreter, #1075) - Fix interpolation with unary expressions (@mgreter, #1074)
- Fix operator parsing regression (@mgreter, #1068)
- Fix backslash multiline string with win linefeed (@mgreter, #1067)
- Fix incorrect semantics of
@else
(@xyfer, #1062) - Fix source-map regression (@mgreter, #1056)
- Fix one regression with error reporting (@mgreter, #1054)
- Fix url parsing with trailing spaces in url (@mgreter, #1051)
- Fix
@elseif
keyword not being parsed (@xyfer, #1060) - Fix empty ruleset blocks sometimes being outputted (@mgreter, #1109 )
- Fix
random()
not always being random (@xzyfer, #1104) - Fix compilation errors on SmartOS (@candid @saper, #850)
- Fix map key handling (@mgreter, #1086)
- Fix errors parsing block comments in lists (@mgreter, #1082)
- Threadsafe
atof
implementation (@npiguet, #929) - Unquoting null should return null (@xyfer, #1106, #1124)
- Allow empty rest arguments in varargs (@mgreter, #1130)
- Fix the RGB to HSL algorithm (@xyfer, #1132)
- Fix call function incorrectly epanding map arguments (@xyfer, #1133)
- IE property hacks should be parsed as static values (@xyfer, #1098)
- Fix comment_to_string edge case (@xyfer, #1121)
- Fix various string handling regressions (@xyfer, #1127)
- Fix interpolation issues with escape sequence (@mgreter, #1115)
- Fix hsla argument overflow (@mgreter, #1101)
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.
Spring Clean (beta.6)
This is the sixth 3.2.0 beta release and the third release candidate.
The last synced beta round with node-sass (thanks to @am11) brought up a few regressions as expected. It helped us to improve the spec tests by exposing previously untested code parts (notable mention was the lack of any else if
spec test). Beside that we also fixed quite a few other bugs on the way.
Bugfixes
- Improve hash map key handling (@mgreter, #1086)
- Add hotfix for url issue with single variable (@mgreter, #1087)
- Improve block comment parsing for lists (@mgreter, #1082)
- Improve scope handling for variables (@mgreter, #1081)
- Backtrace lines are off-by-one (@saper, #1078)
- Fix argument handling for dynamic
call
function (@mgreter, #1075) - Fix interpolation with unary expressions (@mgreter, #1074)
- Fix operator parsing regression (@mgreter, #1068)
- Fix backslash multiline string with win linefeed (@mgreter, #1067)
- Fix incorrect semantics of
@else
(@xyfer, #1062) - Fix source-map regression (@mgreter, #1056)
- Fix one regression with error reporting (@mgreter, #1054)
- Fix url parsing with trailing spaces in url (@mgreter, #1051)
- Fix
@elseif
keyword not being parsed (@xyfer, #1060) - Fix empty ruleset blocks sometimes being outputted (@mgreter, #1109 )
- Fix
random
not always being random (@xzyfer, #1104) - Fix compilation errors on SmartOS (@candid @saper, #850)
Known issues
- Variable interpolation causes additional string escaping (#1115)
- Erroneous space inserted when using IE property hack (#1098)
Thanks!
This release would not be possible without the hard work of @candid, @mgreter, @saper and @xzyfer.
We already have a bunch of features queued for 3.2.1 and plan to release 3.2.0 in one or two weeks; if we don't get any blocking issues reported in the meantime! So stay tuned and keep testing 🕐
Spring Clean (beta.5)
This is the fifth 3.2.0 beta release and the second release candidate.
Features
- Enable to extend selector groups (@mgreter, #950)
- Enable OS-X CI testing via Travis (@mgreter, #1024)
- Enable url function overloading (@mgreter, #1010, #674)
Bugfixes
- Fix tabs when bubbling feature blocks (@mgreter, #1044)
- Fix white-space issue with wrapped selectors (@mgreter, #1025)
- Fix bug in C-API with context compiler status (@mgreter, #1038)
- Fix
@extend
specificity problems (@mgreter, #592) - Fix parsing of another missed block comment (@mgreter, #1021)
- Add units-level-3 and at-error feature flag (@xyfer, #1011, #1013)
- Fix parsing of some more missed block commen (@mgreter, #1007)
- Fix dynamic exception as per C++11 specs. (@am11, #1006)
Spring Clean (beta.4)
This is the fourth 3.2.0 beta release and the first release candidate for 3.2.0.
This beta brings the last and probably biggest chunk of breaking changes to the C-API (only for custom functions and importers). Hopefully the right step to stabilize those APIs. Adds support for multiple importers and a new experimental feature called custom headers, which works very similar to custom importers. It all evolved from a ticket named custom mixins, which can now be achieved by using custom headers. For a complete list of C-API changes and how to update your code, consult PR #1000.
Features
- Support multiple importers (alpha, @mgreter, #1000, #962)
- Custom headers (experimental, @mgreter, #1000, #960)
Bugfixes
- Fix edge case in
Parent_Selector
evaluation (@mgreter, #1004) - Fix build to copy sass_version header (@drewwells, #998)
- Implement
/deep/
shadow DOM selector (@mgreter, #452) - Fix
&
interpolation causing segfaults (@mgreter, #978) - Fix wrong line in error message (@mgreter, #972)
- Fix variable Interpolation in
@keyframe
(@mgreter, #947) - Code clean up in
listize.cpp
(@xyfer, #975)
Credits
We are looking forward to make the 3.2.0 release happen soon 🚀 !
Thanks to all beta testers and specially to the node-sass team 🐝 !
Spring Clean (beta.3)
This is the third 3.2.0 beta release.
It includes two new major features, that have not been available before! @ekskimn tackled &
support in SassScript while @mgreter implemented correct variable scoping! Beside these features, we have merged a lot of bugfixes and performance improvements!
Features
- Implement support for
&
in SassScript (@ekskimn, #966, #548) - Add correct variable scoping (@mgreter, #986, #990)
- Performance improvements in parser (@mgreter, #985, #990)
- Provide a formatted error output (@mgreter, #938)
- Add
sass_context_take_included_files()
(@rodneyrehm, #982)
Bugfixes
- Fix memory management issues (@mgreter, #940)
- Fix block comment parsing regression (@mgreter, #941)
- Support multiline string with trailing backslash (@mgreter, #942)
- Refine illegal extend error across media-queries (@mgreter, #943)
- Error when property-value is missing (@mgreter, #945)
- Fix
@error
to exit with error message (@asottile, #967) - Fix reported position when no token can be parsed (@mgreter, #972)
- Fix variable length parameter (@mgreter, #980)
- Fix regression with
str-slice
(@mgreter, #988) - Simplify autotools build (@saper, #992)
Credits
Special shout-out to @ekskimn for his great work on &
support and to @hugogiraudel for the extensive spec-tests on variable scoping! We also want to thank @asottile, @rodneyrehm and @saper for their contributions. Another release brought to you by @mgreter and @xzyfer 🌅
Spring Clean (beta.2)
Spring Clean (beta.1)
The core developer team kept the pace high over the last weeks and fixed a ton of open issues, while also refactoring an awfull lot of code, plus implementing new and missing features. 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
- 103 closed issues
- 67+ new sass specs
- 282+ new assertions
- 22% less skipped specs
- 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).
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).
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
andcompact
functions (throw errors until removed) (#834, #835)
Changes in C-API
- Implemented error status for importer entries (#926)
- Breaking change in
sass_make_data_context
(#925) - Added
char* indent
andchar* linefeed
to options (#787) - Added
string_list* plugin_paths
to options (#919) - Added
char* plugin_path
to options (#919) - Added
char* source_map_root
to options (#926) - Added
char* error_text
to options (#915) - Removed
char* image_path
from options (#834) - Added
sass_option_push_plugin_path
function (#919) - 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. Beside we further improved the specs with new test:
- Added 10 color related function spec tests (@mgreter, #911)
- Added 185 generated tests for interpolation parsing (@mgreter)
Other fixes and features
- Implement raw css imports (@mgreter, #754, #318)
- Fix parsing of dash in declaration values (@xyfer, #733)
- Fully evaluate nested binary operations (@xyfer, #770)
- Made linefeed and indent configurable (@mgreter, #787)
- Improved source-mapping implementation (@mgreter, #792)
- Properly hydrate numbers after operations (@xyfer, #783)
- str-slice $end-at defaults to -1 if omitted (@xyfer, #815)
- Normalize CSS function string arguments (@xyfer, #817)
- Improved handling of negative numbers (@xyfer, #828)
- Update number function signatures (@xyfer, #826)
- Pass arguments by value not reference (@xyfer, #813, #909)
- Parse css comment in function definition (@xyfer, #646)
- Test complete buffer for utf8 characters (@mgreter, #820)
- Pass "keep comments" flag to sass2scss (@anlutro, #866)
- Fix desaturation of greyscale colours (@anlutro, #864)
- Fix crash in Parser::parse_term (@mmaxim, #846)
- Add support for -ms-calc (@xyfer, #842)
- Fix greedy not operator (@xyfer, #873, #897, #920, #934)
- Parse comments in propsets (@xyfer, #890)
- Consistently normalize function names (@xyfer, #877)
- Fix color related issues in functions (@mgreter, #911)
- Fix dash parsing after other tokens (@mgreter, #922)
- Implement number prefix parsing (/[+-]+/) (@mgreter, #535)
- Error on illegal parent selectors in root blocks (@mgreter, #325)
- Fix interpolation in media queries (@mgreter, #346)
- Parse line comments in blocks (@mgreter, #533)
- Error on illegal media blocks extending (@mgreter, #317, #712)
- Threadsafe
atof
implementation (@npiguet, #929) - Fix comments on in propsets causing segfaults (@xzyfer, #901)
Thanks!
A huge thanks to everyone who reported issues 🔆 !!
Honourable mentions to @am11, @anlutro, @chriseppstein, @hcatlin, @hugogiraudel, @lunelson, @mgreter, @mmaxim, @npiguet, @Snugug and @xzyfer for their contributions to Libsass and Sass spec that made this release possible.
Bulleit Bottle
Happy new year! What better way to start the year than with a new Libsass release!
Capitalising on the 3.0 momentum @mgreter and @xzyfer, with help from the Libsass community, have been hard work on this massive release!
Libsass 3.1 brings us closer than ever to Sass feature parity! We've even got a back log of completed features ready to go for the next release!
I'd like to give a shoutout to node-sass team for helping us release and test our RC releases!
Features
- implemented
@debug
- @mgreter - implemented
@error
- @mgreter - implemented
inspect()
- @mgreter - implemented
feature-exists()
- @xzyfer - implemented
unique-id()
- @xzyfer - implemented
random()
- @xzyfer - implemented negative
@for
loops - @mgreter - implemented the
not
operator - @xzyfer - implemented
nth()
for maps - @xzyfer - implemented custom functions and importers - @mgreter
- implemented C API to fetch compiled version - @mgreter
- implemented decrementing in for loops - @mgreter
- improvements to the static value look ahead parser - @xzyfer
- improvements handling of string quotes - @mgreter
- added support for colors
rebeccapurple
andtransparent
- @mgreter - added/improved build scripts for windows - @mgreter
- added AppVeyor for windows CI builds - @mgreter
- added support for converting angle units - @mgreter
- significant speed boost to
map-get()
- @xzyfer - better Windows compilation support - @mgreter @am11
- emit
@charset "UTF-8"
when required - @mgreter - major updates to the C API - @mgreter
Fixes
- no longer allow concatenating with
null
- @xzyfer (#698) - improved handling of colors - @mgreter (#558)
- better support for BEM style selectors - @xzyfer (#738)
- better support for IE properties - @mgreter (#683)
- better support of interoplants in selectors - @xzyfer (#641)
- normalize quotes map keys in
keywords()
- @xzyfer (#721) - normalize quotes in
str-slice
andstr-insert
- @xzyfer (#763) - normalize decimal output - @mgreter @xzyfer (#550, #623)
- fixed allowing redefinition of reserved functions - @xzyfer (#713)
- fixed
keywords()
crashing when no vararg is present - @xzyfer (#672) - fixed default arguments for function arguments - @mgreter (#708)
- fixed colors and number as map keys - @xzyfer (#652, #534)
- fixed incorrect content type for embedded sourcemaps - @xdissent (#723)
- fixed evaluation of negative variables - @xzyfer (#344)
- fixed
@return
sometimes not exiting functions - @xzyfer (#736) - fixed an edge case with
str-slice
- @xzyfer (#762) - fixed parsing of assignments with
!default
and!global
flags - @xzyfer (#759) - fixed
!default
assignments not overridingnull
values - @xzyfer (#740) - fixed allowing maps to be instantiated with duplicate keys - @xzyfer (#628)
- fixed empty css blocks sometimes being outputted - @xzyfer (#659)
- fixed some cases where number comparisons would fail - @xzyfer (#590)
- fixed crashes when multiple semicolons were encountered - @xzyfer (#502)
- fixed a bug with maps and
@each
with only on variable - @xzyfer (#784) - fixed a bug with string interpolation in
url()
s - @mgreter (#644) - fixed some bugs with the C API - @mgreter (#776)
Documentation
This release saw a big increase in the amount of available documentation thanks to @mgreter and @drewwells!!
Sass spec
Sass spec got a major update bringing it up to date with Sass 3.4 thanks to @hcatlin and @xzyfer.
Know issues
!global
is parsed but the scoping rules aren't respected - (#613)- nested media queries aren't combined - (#614)
- operations in brackets like
(1/2)
are sometimes not treated as numbers - (#442, #590) - still some
@extends
edge cases - (#316, #317, #592) - still some sourcemaps issues - (#324)
Huge thanks to everyone that reported bugs, wrote specs and submitted patched. Honourable mentions to @hugogiraudel, @xdissent, @drewwells, @jakob-e, @lunelson, @am11, @hcatlin, @mgreter and @xzyfer for their multiple contributions which made this release possible!