Skip to content
Pre-release

@xzyfer xzyfer released this Jan 12, 2017 · 478 commits to master since this release

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 string first. 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. Theis-bracketed($list) function returns whether a list is bracketed or not, and join() 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

Assets 2
You can’t perform that action at this time.