Skip to content

Commit

Permalink
Allow binop in css round() argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaj committed Nov 17, 2024
1 parent c3517d7 commit ae151b8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ project adheres to
* Improved parse error handling (Issue #141, PR #201, PR #205).
Many parse errors now match the dart sass error message.
Also allow "loud" comments in more places.
* Pure css `round()` may take an expression argument.
* Updated sass-spec test suite to 2024-11-15.


Expand Down
6 changes: 0 additions & 6 deletions rsass/src/sass/functions/math/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ pub fn css_round(s: &ResolvedArgs) -> Result<Value, CallError> {
};
}
(Err(v0), Some(step), None) => (None, v0, Some(step)),
(Err(arg @ Value::BinOp(_)), None, _) => {
return Err(CallError::msg(format!(
"Single argument {} expected to be simplifiable.",
arg.format(Format::introspect()),
)));
}
(Err(v), None, _) => (None, v, None),
};
let number = NumOrSpecial::try_from(number).named(name!(number))?;
Expand Down
1 change: 0 additions & 1 deletion rsass/tests/spec/values/calculation/round/one_argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ fn sass_script() {
);
}
#[test]
#[ignore] // unexepected error
fn unsimplifiable() {
assert_eq!(
runner().ok("a {b: round(1px + 2px - var(--c))}\n"),
Expand Down

0 comments on commit ae151b8

Please sign in to comment.