Releases: sass/libsass
DeVille
DeVille
After 3 years we completed Sass 3.4 compatibility in December 2016.
A few short weeks later we're excited to announce our first beta release of the upcoming LibSass 3.5. Our emphasis will be on implementing Sass 3.5 features. You can read more about what's coming in Sass 3.5 on their blog.
This release is production ready however we cannot guarantee C ABI stability until 3.5.0 stable.
CSS Grid Layout
Thanks to hard work of @delapuente with support from @xzyfer we now have support for the new CSS Grid Layout syntax.
The new CSS Grid Layout module added a new type of syntax: identifiers surrounded by square brackets. We're always striving to be totally compatible with CSS, which meant we needed to support these brackets as well. Here's what they look like in CSS:
.container { grid-template-columns: [first] 40px [line2] 50px [line3] auto [col4-start] 50px [five] 40px [end]; grid-template-rows: [row1-start] 25% [row1-end] 100px [third-line] auto [last-line]; }The solution was clear: Sass already has a list data type, so we'd just allow lists to have square brackets. So
[first]
is just a list containing the unquoted stringfirst
. Like all Sass lists, bracketed lists can either be space-separated or comma-separated:[foo bar baz]
and[foo, bar, baz]
are both lists containing three elements.We've also added function support for bracketed lists. The
is-bracketed($list)
function returns whether a list is bracketed or not, andjoin()
has a new$bracketed
parameter that allows the caller to choose whether or not the resulting list will have brackets (by default, the result is bracketed if the first list is).
C ABI break
This release marks the first breaking change to the C ABI and a resulting ABI bump to 1:0:0. The sass_make_list
function signature was update to support bracket lists.
-union Sass_Value* sass_make_list (size_t len, enum Sass_Separator sep);
+union Sass_Value* sass_make_list (size_t len, enum Sass_Separator sep, bool is_bracketed);
The resulting Sass_List
struct also got a bool is_bracketed
property.
Invert
The invert()
function got support for the new $weight
parameter thanks to @mgreter (#2273).
This is a percentage between 0% and 100% that indicates how inverted the resulting color should be. It defaults to 100%.
Add Sass call stack to the C API
It's now possible to query the the current mixin and function call stack from the C API. Now implementors can expose much more detailed information about the current execution environment. It's super cool, and we're excited to see what people do with it. Thanks @mgreter (#2251)
Check out the API docs for more information.
Features
- Add weight parameter to
invert()
function (@mgreter @xzyfer, #2273) - Bump the
LIBSASS_LANGUAGE_VERSION
to 3.5 (@nschonni, #2274) - Expose
is_bracketed
attribute to the C API (@xzyfer, #2282) - Update list equality checks to consider brackets (@xzyfer, #2281)
- Update the C API documentation (@mgreter @xzyfer)
The Bluesmobile
Fixes
- Fix segfault when comparing pseudo selectors (@xzyfer, #2289)
- Fix thread-safety for mixin recursions check (@mgreter, #2286)
- Fix false parser errors (@xzyfer, #2095)
- Fix bad source mappings for interpolated selectors (@mgreter, #2224)
- Fix not erring when encountering bad interpolations (@mgreter, #2081)
- Fix some error messages to match Ruby Sass (@mgreter, #2267)
Automobile
Better memory management
After a massive effort by @mgreter our memory management has been completely overhauled (#2222). Expect to see significantly less memory usage from now!
Features
Fixes
- Test bootstrap ignoring
SASS_SPEC_PATH
andSASS_SASSC_PATH
environment variables (@xzyfer, #2265) - Incorrect equality of interpolated values (@mgreter, #2261)
- Incorrect error when
@content
is inside@at-root
(@mgreter, #2260) - C-API
copy_options
function losing some options (@mgreter, #2257) - Segfault with
call
ing calc (@mgreter, @xzyfer)
Ecto-1
KITT
LibSass started almost 4 years ago with the singular goal to be a drop in
replacment for Ruby Sass. Since then @hcatlin, @akhleung, @mgreter, and @xzyfer
have been chasing the lofty goal of Sass 3.4. compatibility.
This release marks the completion of that major milestone, and we couldn't be
more excited to release LibSass 3.4 today! π
Sass 3.4
Over the last couple years we've worked very closely with the Ruby Sass team to
reach Sass 3.4 compatibility.
It's become clear that need to draw a line in sand with exactly how exactly
we can match Sass 3.4, especially in the face of changes in Sass 3.5.
With this release the LibSass team is marking the completion of active
development on Sass 3.4 compatibility. From today we'll focus our efforts on
Sass 3.5 compatibility, first prioritising CSS compatibility features like
support for CSS custom property and CSS grids.
Improves to @at-root
@at-root
has mostly worked since it's introduction to LibSass but there have
always been issue when it was combined with conditions (like @if
) or mixins.
These issues were due to a fundamental difference in the LibSass implementation.
The difference has been addressed, so @at-root
is now fully supported.
You can read more about the specifics of this issue in #2089
- Implement the Trace AST node (@xzyfer, #1585)
- Remove the selector stack from the CSSize visitor (@xzyfer, #2091)
- Workaround parent selector issues with at-root (@xzyfer, #2006 #2198)
Delayed Values
Knowing when to evaluate a string, function, do concatenation, or perform math
is a complicated problem with many edge cases. @mgreter has continued his work
on improving the accuracy of these decisions.
- Significant improvements to delayed values (@mgreter, #2042, #2034 #2057)
/
interpreted as division instead of separator (@mgreter, #2149)- Mishandling quotes (@mgreter, #2153 #2156)
Continued improvements to @extend
@extend
is hard. With every release we get better at it and this release is no
exception.
- Extending inner of :not can lead to invalid css (@mgreter, #2054)
- Segfault with
@extend
(@mgreter, #2051) - Extending a placeholder from a media query outputs nothing (@mgreter, #2150)
- Don't drop pseudo elements in wrapped selectors (@xzyfer, #2200)
Memory improvments
@mgreter has done some great work on improving our memory usage when dealing
with large maps, and lists. He's not done yet, keep your eyes peeled for further
improvments in upcomming releases.
Support list functions on maps
Implementing Sass maps was my first major contribution to LibSass. A couple
year later I can finally all the job complete with support for maps in list
functions.
Sourcemaps
@mgreter and @nschonni have made some significant improvements to our
sourcemaps. You can read more about the specifics in the bug links below.
- Bugfixes for source maps (@mgreter, #2216)
- Fixes parent selector mappings
- Fixes media block/query mappings
- Fixes range over binary expressions
- Don't include semicolon for statics
- Fixes variable assignment mappings
- Make paths in source comments relative to CWD (@mgreter, #2219)
- Implement source_map_file_urls option (@mgreter, #2220)
- Re-order the sourcemap writing to match spec (@nschonni, #2193)
Features
- Improve debugger coverage (@xzyfer, #2093)
- Add Sass lang version to
3.4
(@am11, #2077) - Automake compile on msys2 and mingw64 (@mgreter, #2063)
- Improve
Sass_Value
documentation (@mgreter, #2045) - Add initial CONTRIBUTING.md and ISSUE_TEMPLATE.md (@mgreter, #2044)
- Update sass2scss to latest version (@mgreter, #2177 #1990 #1781)
- Implement the check nesting visitor (@xzyfer, #2062)
Fixes
color-change()
with$hue
(@mgreter, #2113)@import
causing process to hang (@mgreter, #2106)- Broken link (@MoritzKn, #2105)
- Specificity for
Simple_Selectors
nodes (@xzyfer, #2099) @at-root
without arguments (@xzyfer, #2092)- Segfault with calc prefix and underscore vs hyphen (@mgreter, #2074)
- Error message for missing arguments (@mgreter, #2067)
- Warning under MSVC x86_64 (@asottile, #2047)
- MSVC x86_64 buffer overrun in error reporting (@mgreter, #2046)
- Handling "\a" in interpolations (@mgreter, #1786)
- Including a
@mixin
when outside of selector still outputs properties (@xzyfer, #1732) - Add error when comma lists are used as map keys (@mgreter, #1537)
- Evaluation of
&
in sass script (@mgreter, #2124 #2116) - Handle unicode chars in unquoted urls (@mgreter, #2120 @xzyfer, #2125)
hue()
for rgb colors when$saturation: 0
(@mgreter, #2135)- Invalid duplicate keys in maps (@mgreter, #2118)
str-slice()
with negative length (@mgreter, #2132)- Segfault parsing multiple operations in calc (@mgreter, #2151)
- Stackoverflow and segmentation failure on recrusive dependence mixins (@mgreter, #2144)
- Don't allow math on maps (@mgreter, #2147)
- Don't allow math on colors (@xzyfer, #2140)
- CSS comment inside of @supports incorrect CSS output (@mgreter, #2158)
- Check and error on empty variable assignments (@mgreter, #2143 #2146)
- Incorrect output when concatenating an empty string (@mgreter, #2169)
- Brew 1.0.0 release causing OSX CI failures (@xzyfer, #2183)
- Handling empty nested media queries (@xzyfer, #2154)
@at-root
for loop and logic statements (@mgreter, #2187)- Typo in docs (@asottile, @2201)
- Memory leak (@mgreter, #2211 #2213)
- Using
...
in an overloaded function causes fatal error (@mgreter, #2205) - Should error when attempting to output an empty list or map (@mgreter, #1452)
- Don't error when an @import is terminated by the end of the block (@xzyfer, #2233)
- Fix modulo operation (@mgreter, #2236)
Misc
- Rename some selector AST nodes to better match the reference (@xzyfer, #2101)
- Add php wrapper project link (@lesstif, #2121)
- Add Elixir wrapper project link (@scottdavis, #2141)
- Updated README (@am11, #2172)
- Enabling debug builds by setting env var DEBUG=1 (@delapuente, #2176)
- Remove
-ldl
flag from OpenBSD too (@parhs, #2210) - Remove superfluous dev error message (@mgreter, #2217)
KITT
See the 3.4.0 release notes for a full recap.
Features
- Improve debugger coverage (@xzyfer, #2093)
- Add Sass lang version to
3.4
(@am11, #2077) - Automake compile on msys2 and mingw64 (@mgreter, #2063)
- Improve
Sass_Value
documentation (@mgreter, #2045) - Add initial CONTRIBUTING.md and ISSUE_TEMPLATE.md (@mgreter, #2044)
- Update sass2scss to latest version (@mgreter, #2177 #1990 #1781)
- Implement the check nesting visitor (@xzyfer, #2062)
- Implement source_map_file_urls option (@mgreter, #2220)
- Re-order the sourcemap writing to match spec (@nschonni, #2193)
- Implement the Trace AST node (@xzyfer, #1585)
- Significant improvements to delayed values (@mgreter, #2042, #2034 #2057)
- Improve memory footprint when evaluating in loops (@mgreter, #2171)
- Support list functions on maps (@xzyfer, #1930)
Fixes
- Extending inner of :not can lead to invalid css (@mgreter, #2054)
- Segfault with
@extend
(@mgreter, #2051) - Extending a placeholder from a media query outputs nothing (@mgreter, #2150)
- Don't drop pseudo elements in wrapped selectors (@xzyfer, #2200)
/
interpreted as division instead of separator (@mgreter, #2149)- Mishandling quotes (@mgreter, #2153 #2156)
- Remove the selector stack from the CSSize visitor (@xzyfer, #2091)
- Workaround parent selector issues with at-root (@xzyfer, #2006 #2198)
- Bugfixes for source maps (@mgreter, #2216)
- Make paths in source comments relative to CWD (@mgreter, #2219)
color-change()
with$hue
(@mgreter, #2113)@import
causing process to hang (@mgreter, #2106)- Broken link (@MoritzKn, #2105)
- Specificity for
Simple_Selectors
nodes (@xzyfer, #2099) @at-root
without arguments (@xzyfer, #2092)- Segfault with calc prefix and underscore vs hyphen (@mgreter, #2074)
- Error message for missing arguments (@mgreter, #2067)
- Warning under MSVC x86_64 (@asottile, #2047)
- MSVC x86_64 buffer overrun in error reporting (@mgreter, #2046)
- Handling "\a" in interpolations (@mgreter, #1786)
- Including a
@mixin
when outside of selector still outputs properties (@xzyfer, #1732) - Add error when comma lists are used as map keys (@mgreter, #1537)
- Evaluation of
&
in sass script (@mgreter, #2124 #2116) - Handle unicode chars in unquoted urls (@mgreter, #2120 @xzyfer, #2125)
hue()
for rgb colors when$saturation: 0
(@mgreter, #2135)- Invalid duplicate keys in maps (@mgreter, #2118)
str-slice()
with negative length (@mgreter, #2132)- Segfault parsing multiple operations in calc (@mgreter, #2151)
- Stackoverflow and segmentation failure on recrusive dependence mixins (@mgreter, #2144)
- Don't allow math on maps (@mgreter, #2147)
- Don't allow math on colors (@xzyfer, #2140)
- CSS comment inside of @supports incorrect CSS output (@mgreter, #2158)
- Check and error on empty variable assignments (@mgreter, #2143 #2146)
- Incorrect output when concatenating an empty string (@mgreter, #2169)
- Brew 1.0.0 release causing OSX CI failures (@xzyfer, #2183)
- Handling empty nested media queries (@xzyfer, #2154)
@at-root
for loop and logic statements (@mgreter, #2187)- Typo in docs (@asottile, @2201)
- Memory leak (@mgreter, #2211 #2213)
- Using
...
in an overloaded function causes fatal error (@mgreter, #2205) - Should error when attempting to output an empty list or map (@mgreter, #1452)
Misc
- Rename some selector AST nodes to better match the reference (@xzyfer, #2101)
- Add php wrapper project link (@lesstif, #2121)
- Add Elixir wrapper project link (@scottdavis, #2141)
- Updated README (@am11, #2172)
- Enabling debug builds by setting env var DEBUG=1 (@delapuente, #2176)
- Remove
-ldl
flag from OpenBSD too (@parhs, #2210) - Remove superfluous dev error message (@mgreter, #2217)
Herbie
I woke up this morning to an inbox full of gifts from @mgreter π π
Feature
- Expose the Sass language version via the C API (@chriseppstein, #2021)
Fixes
- Incorrectly erring on comments in at-rules (@mgreter, #1233)
- Incorrectly dropping internal state of AST nodes (@mgreter, #1661)
- Incorrectly parsing the
calc
function (@mgreter, #1706) - Segfault during error handling (@mgreter, #2016)
- Incorrectly identifying the selectors with
type-of
(@mgreter, #2020) - Incorrectly erring on ID selectors starting with a number (@mgreter, @2023)
- Producing incorrect output when compile with MSVC (@mgreter, #2039)
- Various segfaults and incorrect output from
@extend
(@mgreter, #2017 #2031)
General Lee
This is a modest release focused continues to address some regressions as well general improvements to @extend
π with sprinkling of improvements to the C API π
Expose our memory allocator
This feature has taken many proposed forms over the last 4 months. After much patent and considered discussion by @am11 @mgreter @saper and @xoofx you can now access our memory allocator on the C-API.
void* sass_alloc_memory(size_t size)
char* sass_copy_c_string(const char* str)
void sass_free_memory(void* ptr)
Features
Build
- Enable address sanitizer for clang (@mgreter, #2003)
- MSVC assert too strict (@mgreter, #1985)
- Update Sass spec (@xzyfer, 1967)
Fixes
- Incorrectly erring on
@extend
and@media
(@mgreter, #2009 #2007, #1927, #1923) - Incorrectly erring on
@extend
and interpolated selectors (@mgreter, #2000) - Builds not failing when Sass spec fails to load (@saper, #1997)
- Incorrectly erring on Sass comments in selectors (@mgreter, #1996)
- Incorrectly erring on
@extend
and interpolated selectors with the!optional
flag (@mgreter, #1993) - Incorrectly treating
0
andfalse
as the same value when used as map keys (@mgreter, #1991) - Incorrectly erring on escaped and unicode selectors (@mgreter, #1977)
- Incorrectly rendering
@extend
and@supports
(@mgreter, #1971) - Incorrectly erring on functions beginning with
calc
(@mgreter, #1969) - Incorrectly quoting interpolated strings in selectors (@mgreter, #1947)
- Incorrectly escaped escaped strings in selectors (@mgreter, #1945)
- Incorrectly duplicating executing of function in interpolated string (@mgreter, #1944)
- Prevent parsing
url()
resulting in an endless loop (@mgreter, #1931) - Compilation error with using
-DDEBUG
flag (@tony, #1917) - Incorrectly removing
@media
blocks that contain only CSS comments (@mgreter, #1889) - Better handling of
/
in function arguments (@mgreter, #1417)
Special thanks to @am11, @tony, @xoofx for their contributions to this release! π
Christine
This is a modest release focused on addressing some regressions that popped up in the previous 3.3.3 release. π
Fixes
- Inconsistent error message produced when nesting functions and mixins (@xzyfer, #1941)
- Ensure custom importers are executed for all
@imports
(@xzyfer, #1935) - Ensure custom importers are executed in the correct order (@xzyfer, #1921)
- Possible segfault when generating sourcemaps (@usta, #1920)
- Memory leak (@usta, #1919)
- Unused variable warning (@xzyfer, #1918)
- Segfaulting when
@extend
ing an undefined selector (@mgreter, #1916) - Incorrectly erring when
@extend
ing inside a mixin (@xzyfer, #1915) - Handle signed char when considering
@charset
(@asottile, #1914) - New link to
sassc-ruby
in documentation (@itkrt2y, #1910) - Incorrectly quoting interpolated strings join with
+
(@mgreter, #1907) - Incorrectly erring when using
&
and interpolation together (@xzyfer, #1904) - Incorrectly duplicating nested pseudo selectors (@mgreter, #1901)
- Unused function breaking breaking unity builds (@drewwells, #1896)
- Segfaulting when
url()
is empty (@xzyfer, #1886) - Should error when
&
is used without a parent selector (@xzyfer, #1644)
Special thanks to @asottile, @drewwells, @itkrt2y, @usta for their contributions to this release! π
Upcoming version 3.3.5
We weren't able to get around the planned breaking changes to the C-API. This work will continue in 3.3.5.