Skip to content

Commit 6cabc74

Browse files
committed
Allow eg saturate(200%)
The argument to `saturate` as a filter is not limited to 0..100%. Fixes #119. Thanks to @paolobarbolini for reporting.
1 parent dbdc2d8 commit 6cabc74

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ project adheres to
2929
* Improve error reporting from inside mixins and functions.
3030
* Support interpolation in `@`-rule names.
3131
* Fixed #116: The `sass:map.merge` function was buggy.
32+
* Fixed #119: `saturate(200%)` is allowed (the argument is not limited
33+
to 0..100%).
3234
* Fixed reformatting of to-much-indented comments.
3335
* Unicode Private-use characters are escaped when printed.
3436
* Update sass-spec test suite to 2021-09-20.
3537

38+
Thanks to @paolobarbolini and @connorskees for reporting issues.
39+
3640

3741
## Release 0.22.2
3842

Diff for: src/sass/functions/color/hsl.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use super::channels::Channels;
22
use super::{
3-
bad_arg, check_alpha, check_pct_range, check_rational, get_checked,
4-
get_color, get_opt_check, is_special, make_call, CheckedArg, FunctionMap,
3+
bad_arg, check_alpha, check_pct, check_pct_range, check_rational,
4+
get_checked, get_color, get_opt_check, is_special, make_call, CheckedArg,
5+
FunctionMap,
56
};
67
use crate::css::{CallArgs, Value};
78
use crate::output::Format;
@@ -98,7 +99,7 @@ pub fn expose(m: &Scope, global: &mut FunctionMap) {
9899
.eval(s.clone(), args)
99100
.map_err(|e| bad_arg(e, &name!(saturate), &a2))?;
100101
let sat = s.get("amount")?;
101-
check_pct_range(sat.clone()).named(name!(amount))?;
102+
check_pct(sat.clone()).named(name!(amount))?;
102103
Ok(make_call("saturate", vec![sat]))
103104
}
104105
Err(ae) => Err(bad_arg(ae, &name!(saturate), &a1)),

0 commit comments

Comments
 (0)