All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Released 2022-05-27. Progress: 4350 of 6552 tests passed in dart-sass compatibility mode.
path.join for putting the local part after
a base path, seems to make slash-separated strings ok as the joined
part. (PR #144, issue #133)Thanks to @fasterthanlime for reporting and testing.
Released 2022-05-17 (On the Norwegian Constitution day 🇳🇴). Progress: 4331 of 6523 tests passed in dart-sass compatibility mode.
SourceFile.parse() now returns a Result<Parsed> rahter than a
Result<Vec<sass::Item>>, and Format::write_root now takes a
Parsed (PR #140).FsFileContext::file is replaced by FsFileContext::for_path,
which initializes a file context and loads a file from it (PR 137).@import rules is only allowed on a few
condtions,
in other cases an error is reported (Issue #139, PR #137).@use and @import directives, as well as in the
meta.load-css mixin (PR #140).calc(...) function signal an error when args are known to
be invalid css (PR #138).map.deep-merge to match recent change in dart sass.tracing (PR #137).Thanks to @jonassmedegaard for #136, and to @fasterthanlime for reporting the problem that #137 attempts to fix.
Released 2022-03-23. Progress: 4013 of 6478 tests passed in dart-sass compatibility mode.
parse_scss_file and parse_scss_path is removed.
Use SourceFile (maybe from a FileContext) instead (PR #132).SourceFile as return type) in
FileContext and FsF ileContext (PR #132).Scope::get now takes an &Name rather than an &str for the
variable name.sass::Value::Variable now has a source position.sass::Item and css::BodyItem got new alternatives for custom
properties (PR #134).Error type to facilitate positions.meta.load-css mixin (PR #131).calc and clamp handling (PR #133).@import loops.Released 2022-02-06. Progress: 3872 of 6477 tests passed in dart-sass compatibility mode.
max and min css unctions.Released 2022-02-04. Progress: 3872 of 6477 tests passed in dart-sass compatibility mode.
Released 2021-12-10. Progress: 3849 of 6444 tests passed in dart-sass compatibility mode (this may seem like a regression, but that is caused by changes in the test suite).
Error has a new alternative, AtError.sass::Item, the Error, MixinCall and MixinDeclaration
variants is changed to include a SourcePos. Also, a sass::Mixin
contains a SourcePos for where it is declared.SourcePos is now private.name of a sass::Item::AtRule is now a SassString.css::Value::Literal now contains a CssString rather than a
String and a Quotes. Evaluating a SassString also returns a
CssString (PR #118).selector module to the css
and sass modules. Anything that used selector types should now
use either css or sass types (PR #123).@error errors.@-rule names.sass:map.merge function was buggy.saturate(200%) is allowed (the argument is not limited
to 0..100%).sass:selector functions append, nest, and parse are closer
to correct (PR #123).sass:meta functions calc-args and calc-name implemented (PR #126).nom to 7.0 and nom-locate to 4.0.Thanks to @paolobarbolini, @connorskees and @charlesxsh for reporting issues.
Released 2021-07-03. Progress: 4002 of 6180 tests passed in dart-sass compatibility mode.
red(..), green(..), and blue(..) functions to
always return integers. Issue #114, thanks @Keats.blackness(..) and whiteness(..) functions to return
blackness/whiteness of the integer rgb approximations of the color
rather than the exact color.Progress: 3992 of 6180 tests passed in dart-sass compatibility mode.
sass::Item::MixinCall enum alternative was modified.css::CallArgs and sass:CallArgs,
and new alternatives in sass::ArgsError.css::Value has a new variant ArgList.OrderMap::keys() and values() functions now returns iterators,
OrderMap::remove(key) now returns the removed value.@content item, and the
content_exists function. Fixes #112.@import exposes things @forwarded in the imported module.keywords function in sass:meta.Thanks to @Keats for reporting #112 and #108.
Progress: 3727 of 6171 tests passed in dart-sass compatibility mode.
value::Unit and value::ListSeparator has new alternatives.List alternative in sass::Value and css::Value is modified.Use alternative in sass::Item is modified, and Forward added.@forward and some more of @use is now supported.
PR #109 and #110.meta.module_variables and meta.module_functions.math.div function.hwb, alpha, and invert
functions in sass:color module.if function evaluates its arguments lazily. Issue #107.--include-path cli argument is now named --load-path.@use and @import) in rust code for the suite.Tested with rustc 1.52.1, 1.50.0, 1.48.0, 1.45.2, 1.53.0-beta.3 (82b862164 2021-05-22), and 1.54.0-nightly (657bc0188 2021-05-31).
Progress: 3456 of 5962 tests passed in dart-sass compatibility mode.
sass::Name, but instead a String.sass::Name ($a_b and $a-b is the same
variable, but a_b and a-b are different scopes).sass:map functions get and merge and add deep-merge
and deep-remove.Tested with rustc 1.51.0 (2fd73fabe 2021-03-23), 1.48.0 (7eac88abb 2020-11-16), 1.46.0 (04488afe3 2020-08-24), 1.44.1 (c7087fe00 2020-06-17), 1.51.0-beta.8 (73f48e5f6 2021-03-18), 1.53.0-nightly (07e0e2ec2 2021-03-24).
Version 0.20.0 was originally released as 0.19.2, but yanked as there was a breaking change.
Progress: 3371 of 5945 tests passed in dart-sass compatibility mode.
Numeric is now a UnitSet rather than a Unit.Error has new variants and a new field in BadArguments.Rational is now a Ratio<i64> rather than a Ratio<isize>.@at-root at document root.false and f($x) does not call f.Thanks to @alvra for reporting #98.
Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), rustc 1.48.0 (7eac88abb 2020-11-16), rustc 1.46.0 (04488afe3 2020-08-24), rustc 1.44.1 (c7087fe00 2020-06-17), rustc 1.51.0-beta.6 (6a1835ad7 2021-03-12), and rustc 1.52.0-nightly (acca81892 2021-03-13).
Progress: 2892 of 5945 tests passed in dart-sass compatibility mode.
Lots of things have been moved around. See Scope, Numeric, and
Function in particular.
@use of user-defined modules. PR #96.struct Scope replaces trait and three structs. PR #95.@for loops inside sass functions.value mod, imporoved docs. PR #90.$=, ~= and ^= in css attribute selectors.
Issue #91, PR #92.Numeric is a Number with a Unit. Also hide NumValue enum. PR #93.SassFunction type is now named sass::Function.Thanks to @mfeckie for #91/#92.
Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), rustc 1.48.0 (7eac88abb 2020-11-16), rustc 1.46.0 (04488afe3 2020-08-24), rustc 1.44.1 (c7087fe00 2020-06-17), rustc 1.51.0-beta.3 (b631c914c 2021-02-24), and rustc 1.52.0-nightly (a8486b64b 2021-02-24).
Progress: 2784 of 5936 tests passed in dart-sass compatibility mode.
sass::Item::Use was modified by #84.compile_scss_file is renamed to compile_scss_path, and
FileContext is now a trait, the default implementation is renamed
to FsFileContext by #85.FileContext, PR #85.@use name as * syntax, PR #84.Error::BadValue a little closer to whats expected.@for loops.nom to 6.0, PR #83.rand to 0.8, PR #86.Thanks to @paolobarbolini and @alvra for code contributions.
Tested with rustc 1.49.0 (e1884a8e3 2020-12-29), 1.44.1 (c7087fe00 2020-06-17), 1.46.0 (04488afe3 2020-08-24), 1.48.0 (7eac88abb 2020-11-16), 1.50.0-beta.8 (1cd030396 2021-01-20), and 1.51.0-nightly (c0b64d97b 2021-01-28).
Progress: 2718 of 5840 tests passed in dart-sass compatibility mode.
SourceName and sass::Item::Import was changed by #62.Use was added to the sass::Item enum by #80.sass::Value and css::Vaue by #81.@use for standard sass modules. All standard
modules are at least partially supported, only sass:string is
fully supported. See issue #60 for for module support status.sass:color.
Also, provide From<Rgba> for css::Value and deprecate color
value constructors.From<bool> for css::Value (and deprecate Value::bool(v)).ParseError, SourcePos, and SourceName by using
located spans by nom_locate in
the parser. A sass::Item::Import now handles where each file is
imported from, to improve error reporting.Value::Number handles both
machine-sized rationals, bignum rationals and floats internally and
Value::NumberBig is removed. Also, Value no longer implements
Ord but only PartialOrd, to handle f64 NaN an infinite values
correctly.@else clauses.Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.8 (121901459 2020-11-08), and 1.49.0-nightly (25f6938da 2020-11-09),
Progress: 2320 of 5577 tests passed in dart-sass compatibility mode.
Item::Comment enum value now contains a SassString rather
than a String.Error::ParseError enum value changed, and ErrPos is replaced
with SourcePos and SourceName.parse_scss_data changed to ParseError.Unit::dimension() now returns a Dimension rather than a &str.& items in the same selector.& evaluates to null when used as a value without enclosing selector.@debug directive.a % b evaluation for negative values.!default and !global in any order on variable declarations.inspect(...) formatting of list values.ListSeparator is now Copy.Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.5 (4c78178b1 2020-10-21), and 1.49.0-nightly (ffa2e7ae8 2020-10-24).
Progress: 2294 of 5577 tests passed in dart-sass compatibility mode.
@-rules with escaped characters.@charset rules to output (one is included if
needed).Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.2 (212e76c31 2020-10-08), and 1.49.0-nightly (8dae8cdcc 2020-10-12)
Progress: 2234 of 5510 tests passed in dart-sass compatibility mode.
Value variants for
BigInt numbersrgba(r g b / a) and hsla(h s l / a) functions,
i.e. the channels parameter with div-separated alpha channel.@import indention.parse_value_data.Tested with rustc 1.46.0 (04488afe3 2020-08-24), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.47.0-beta.7 (e28d2bd09 2020-10-01), and 1.48.0-nightly (8876ffc92 2020-10-02)
Progress: 1634 of 3502 tests passed in libsass compatibility mode.
format method, that takes an output format and provides a
Display implementation.compile_value rust function now takes a format argument.min(..) and max(...) functions are
handled as plain css functions when valid, while still handling them
as sass functions when nessecary.@function bodies.Thanks to @connorskees for code contributions and bug reports.
Tested with rustc 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.43.0-beta.6 (062dea094 2020-04-18), and 1.44.0-nightly (52fa23add 2020-04-18).
str_slice require integer indexes.Thanks to @connorskees for bug reports.
Tested with rustc 1.41.0 (5e1a79984 2020-01-27), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.42.0-beta.3 (86f329b41 2020-02-07), and 1.43.0-nightly (436494b8f 2020-02-22).
@import and media rules.@error and @warn directives.random() function.Thanks to @emielbeinema, @maxbrunsfeld, and @Boiethios for contributed code and suggestios.
Tested with rustc 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.41.0-beta.1 (eb3f7c2d3 2019-12-17), and 1.42.0-nightly (a9c1c04e9 2019-12-24).
url(foo) as simply a string if possible. Sometimes, such
as url("foo" + $bar), it must be a function returning a string
instead. Partially adresses #42. Fixes #41.calc, element, env, expression, var, and
progid:... special functions. Partially adresses #42. Fixes #53.Thanks to @glebm and @nic-harley for reports and suggestions.
Sass-spec reports 1507 of 2865 tests passed in libsass compatibility mode.
nom to version 5.0.# without being a color.unit, unitless, quote, and
unquote functions.random function ignores units.str_slice and str_insert.quote function can use single quotes when needed.Tested with rustc 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.32.0 (9fda7c223 2019-01-16), 1.37.0-beta.3 (2ba6de7e2 2019-07-12), and 1.38.0-nightly (4b65a86eb 2019-07-15).
Sass-spec reports 1472 of 2802 tests passed in libsass compatibility mode.
rsass.-I commandline argument for include path.-v for version (expected by the test runner).rgba function.inspect shows parens for empty list, and spells out "null" for
a null value.index and nth functions.unique_id function.str_slice function.deunicode to 1.0 and rand to 0.7.0.I don't really know if I should target libsass or dart-sass compatibility, but libsass seems to be closer to my current implementation, so target that at least for now.
Thanks to @maxbrunsfeld and @glebm for code and suggestions.
Tested with rustc 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.32.0 (9fda7c223 2019-01-16), 1.37.0-beta.1 (178aa6611 2019-07-04), and 1.38.0-nightly (481068a70 2019-07-05).
Sass-spec reports 1645 of 3440 tests for sass 3.6 passed.
transparent.Thanks to contributors @glebm, @maxbrunsfeld and @sunjay for code and suggestions.
Tested with rustc 1.32.0 (9fda7c223 2019-01-16), 1.31.0 (abe02cefd 2018-12-04), 1.33.0-beta.6 (b203178b6 2019-02-05), and 1.34.0-nightly (3315728c0 2019-02-09).
A default run of sass-spec found 1680 of 3635 tests passing.
fr unit.length function now correctly returns one for single
(non-list) values.Tested with 1.31.1 (b6c32da9b 2018-12-18), 1.30.1 (1433507eb 2018-11-07), 1.29.0 (aa3ca1994 2018-09-11), 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.32.0-beta.12 (2bde39b8e 2019-01-05), and 1.33.0-nightly (d22fa2d87 2019-01-08)
A default run of sass-spec found 1672 of 3483 tests passing.
Tested with rust 1.29.0 (aa3ca1994 2018-09-11), 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.30.0-beta.7 (0ebb25088 2018-09-22), and 1.30.0-nightly (4591a245c 2018-09-22).
Thanks again to @killercup and rust-fuzz/targets#119 for identifying more parser crashes on non-utf8 input.
Tested with rustc 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.24.1 (d3ae9a9e0 2018-02-27), 1.29.0-beta.9 (b4ec8d46e 2018-09-01), and 1.30.0-nightly (28bcffead 2018-09-01).
A default run of sass-spec found 1661 of 3482 tests passing.
Changes since version 0.8.0 includes:
@at-root. Supports & back-refs but
not with and without.rgba function handle non-numeric inputs (e.g. calc(...)).feature-exists function.!important part of value rather than property, so it can be
used in function / mixin arguments etc.@each construct can bind multipe values.Thanks to @killercup and rust-fuzz/targets#119 for identifying some parser crashes on non-utf8 input.
Tested with rustc 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.24.1 (d3ae9a9e0 2018-02-27), 1.29.0-beta.6 (5c5be098e 2018-08-25), and 1.30.0-nightly (39e6ba821 2018-08-25).
A default run of sass-spec found 1583 of 3364 tests passing.
Changes since version 0.7.0 includes:
check_spec.get-function function, making a (named) function a
css::Value, and modify the call function to take such a Value. The
warning when the Value is a Literal is more motivated now.@include w/o ";" to be last input.expanded and compressed.& value, expanding to the selector containing the
value.selector-parse, selector-append, and
selector-nest functions.Tested with rustc 1.23.0 (766bd11c8 2018-01-01), 1.24.1 (d3ae9a9e0 2018-02-27), 1.25.0 (84203cac6 2018-03-25), 1.26.0-beta.2 (0e350672e 2018-04-05), and 1.27.0-nightly (eeea94c11 2018-04-06).
A default run of sass-spec found 1466 of 3339 tests passing (or 1520 of 6094 when claiming to be libsass). Changes since version 0.6.0 includes:
@-rules.Tested with rustc 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.1 (05e2e1c41 2017-11-22), 1.23.0-beta.2 (c9107ee93 2017-12-08), and 1.24.0-nightly (1abeb436d 2017-12-27).
A default run of sass-spec found 1466 of 3339 tests passing (or 1520 of 6094 when claiming to be libsass). Changes since version 0.5.0 includes:
Tested with rustc 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.1 (05e2e1c41 2017-11-22), 1.23.0-beta.1 (082b0ff02 2017-11-21), and 1.24.0-nightly (cfba0d446 2017-12-05).
A default run of sass-spec found 1359 of 3331 tests passing (or 1416 of 6086 when claiming to be libsass). Changes since version 0.4.0 includes:
Tested with rustc 1.18.0 (03fc9d622 2017-06-06), 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.0-beta.2 (a0a837c45 2017-10-20), and 1.23.0-nightly (d762b1d6c 2017-11-04).
A default run of sass-spec found 1163 of 3331 tests passing (or 1227 of 6086 when claiming to be libsass). Changes since version 0.3.4 includes:
unitless, content-exists, zip,
is-bracketed, join.Thank You to Jonas Nicklas for many contributions.
Tested with rustc 1.18.0 (03fc9d622 2017-06-06), 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), rustc 1.21.0 (3b72af97e 2017-10-09), 1.22.0-beta.1 (e694dd37b 2017-10-12), and 1.22.0-nightly (7778906be 2017-10-14).
A default run of sass-spec found 1146 of 3310 tests passing (or 1215 of 6065 when claiming to be libsass). Changes since version 0.3.2 includes:
Tested in rust 1.15.1 (021bd294c 2017-02-08), 1.16.0 (30cf806ef 2017-03-10), 1.17.0 (56124baa9 2017-04-24), 1.18.0-beta.4 (0308c9865 2017-05-27), and 1.19.0-nightly (0418fa9d3 2017-06-04).
A default run of sass-spec found 1053 of 3299 tests passing (or 1111 of 6054 when claiming to be libsass). Changes since version 0.3.0 includes:
Tested in rust 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25), and 1.19.0-nightly (f4209651e 2017-05-05).
A default run of sass-spec found 1039 of 3299 tests passing (or 1097 of 6054 when claiming to be libsass). Changes since version 0.2.0 includes:
Tested in rust 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25), and 1.19.0-nightly (f4209651e 2017-05-05).
A default run of sass-spec found 841 of 3294 tests passing (or 899 of 6049 when claiming to be libsass). Changes since version 0.1.10 includes:
Error, not String.
This is a breaking change in public api.@content for mixins (some scoping issues remains).call() function.ie-hex-str() function.rgba() function.for, while, and each in user-defined functions.Tested in rust 1.14.0, 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25) and 1.18.0-nightly (94e884b63 2017-04-27).
* in selectors\ in selectorsappend, length, and index.min and max.@for and @each loop handling.Tested in rust 1.14.0, 1.15.1, 1.16.0 (stable), 1.17.0-beta.3 (beta), and 1.18.0-nightly (28a742997 2017-04-13).
A default run of sass-spec found 576 of 3294 tests passing (or 619 of 6049 when claiming to be libsass). Changes since version 0.1.6 includes:
global_variable_exists, function_exists,
mixin_exists.@each, @for and @while loops.spec/scope.Tested in rust 1.14.0, 1.15.1, 1.16.0 (stable), 1.17.0-beta.3 (beta), and 1.18.0-nightly (53f4bc311 2017-04-07).
A default run of sass-spec found 502 of 3289 tests passing (or 532 of 6044 when claiming to be libsass). Changes since version 0.1.4 includes:
at directieves.!default tag on variable declaration.!important tag on properties.* character inside comments.Tested in rust 1.14.0, 1.15.1, 1.16.0-beta.3 (stable), and 1.17.0-nightly (b1e31766d 2017-03-03).
A default run of sass-spec found 420 of 3286 tests running (or 449 of 6041 when claiming to be libsass).
? operator rather than the try! macro.Tested in rust 1.14, 1.15, and stable and nightly as of 2017-02-08.
Second release. Passes 380 tests of 6026 from sass-spec. Changes since 0.1.0 include:
str-slice, str-insert, str-length.First release to crates.io. Passes 346 tests of the sass-spec suite.
The first three tests (of several thousand) works. :-)