Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Numeric is a Number with a Unit #93

Merged
merged 7 commits into from
Feb 14, 2021
Merged

A Numeric is a Number with a Unit #93

merged 7 commits into from
Feb 14, 2021

Conversation

kaj
Copy link
Owner

@kaj kaj commented Feb 14, 2021

Provide a type value::Numeric which combines a Number with a Unit, and use that type in sass::Value and css::Value.

@kaj kaj force-pushed the numeric-value branch 7 times, most recently from b76c952 to 290f379 Compare February 14, 2021 19:59
@kaj kaj merged commit 07b42ea into master Feb 14, 2021
@kaj kaj deleted the numeric-value branch February 14, 2021 21:50
kaj added a commit that referenced this pull request Feb 25, 2021
Progress: 2892 of 5945 tests passed in dart-sass compatibility mode.

### Breaking changes

Lots of things have been moved around.  See `Scope`, `Numeric`, and
`Function` in particular.

### Improvements

* Support `@use` of user-defined modules.  PR #96.
* Improve trigonometric precision by using f64 π rather than rational.
* Handle more peculiarities with atan2, pow, infinities and negative zero.
* Improve name lookups in scopes and modules, PR #87.
* new `struct Scope` replaces trait and three structs. PR #95.
* A color can be Hsla or Hwba as well as Rgba. PR #88, #89.
* Handle units in `@for` loops inside sass functions.
* Some types moved into `value` mod, imporoved docs. PR #90.
* Add support for `$=`, `~=` and `^=` in css attribute selectors.
  Issue #91, PR #92.
* A `Numeric` is a Number with a Unit.  Also hide NumValue enum. PR #93.
* The `SassFunction` type is now named `sass::Function`.
* Test suite sass-spec updated to 2021-02-18.
* Some cleanups.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant