2022-12-28 22:34:58 -05:00
<!-- UPCOMING:
- error when `@extend` is used across `@media` boundaries
- more robust support for NaN in builtin functions
2023-01-25 03:35:46 +00:00
- support unquoted imports in the indented/SASS syntax
2022-12-28 22:34:58 -05:00
-->
2024-08-04 18:54:56 +00:00
# 0.13.4
2024-08-04 18:45:01 +00:00
- support `...$keys` argument to `map-has-key(..)` /`map.has-key(..)`
- parse [aliased colors ](https://developer.mozilla.org/en-US/docs/Web/CSS/named-color#description ) (e.g. `cyan` for `aqua` ) as colors rather than identifiers
2024-05-19 04:02:08 +00:00
# 0.13.3
- implement builtin string-module function `string.split(..)` (#96 ) by @xpe
- implement functionality for intercepting logs (#93 ) by cryocz
2024-02-07 05:26:21 +00:00
# 0.13.2
2024-05-19 04:02:08 +00:00
- update rustix dependency to silence security warning
- fix @forward statement altering the scope of the forwarded module (#85 ) by @kketch
- bump MSRV to 1.70.0
2024-02-07 05:26:21 +00:00
2023-07-14 16:08:34 +00:00
# 0.13.1
2024-05-19 04:02:08 +00:00
- update `clap` dependency to 4.x.x to silence `atty` security warning
- bump MSRV to 1.64.0 for new `clap` version
- fix bug in which `--no-charset` flag wasn't respected
2023-07-14 16:08:34 +00:00
2023-05-20 18:13:15 +00:00
# 0.13.0
2024-05-19 04:02:08 +00:00
- fix various module system bugs when combined with `@import` . this is potentially breaking in rare cases where users were relying on the incorrect behavior
- expose more AST internals in `grass_compiler`
- allow building docs with stable/beta rust compiler
- support `...$keys` argument to `map-get(..)` /`map.get(..)` (#83 )
2023-06-30 05:34:05 +00:00
2023-05-12 02:38:41 +00:00
# 0.12.4
2023-05-11 16:38:01 +00:00
2023-05-12 02:34:25 +00:00
- implement builtin map-module functions `map.deep-merge(..)` and `map.deep-remove(..)`
2023-05-11 16:38:01 +00:00
2023-02-18 15:08:43 -05:00
# 0.12.3
No visible changes for users of the `grass` crate
Exposes more internals of the `grass_compiler` crate, allowing for custom functions implemented in rust to be accessed from Sass.
2023-02-01 02:45:17 +00:00
# 0.12.2
2023-01-11 14:59:28 +00:00
- implement an import cache, significantly improving the performance of certain pathological cases
2023-01-17 05:18:17 +00:00
- slash lists can be compared using `==`
- resolve rounding errors for extremely large numbers
- potentially breaking bug fixes in certain color functions
2023-01-25 03:35:46 +00:00
- `color.hwb(..)` no longer allows whiteness or blackness values outside the bounds 0% to 100%
- `scale-color(..)` no longer allows the `$hue` argument. previously it was ignored
- `scale-color(..)` , `change-color(..)` , and `adjust-color(..)` no longer allow invalid combinations of arguments or unknown named arguments
- many functions that accept hues now convert other angle units (`rad` , `grad` , `turn` ) to `deg` . previously the unit was ignored
- improve compressed output of selectors containing newlines and `rgba(..)` colors
- improve resolution of imports containing explicit file extensions, e.g. `@import "foo.scss"`
2023-02-01 02:45:17 +00:00
- fix bug in which whitespace was not emitted between `+` or `-` inside calc for compressed output ([#71 ](https://github.com/connorskees/grass/pull/71 ) by @ModProg )
2023-01-11 14:59:28 +00:00
2023-01-07 17:47:39 +00:00
# 0.12.1
2023-01-03 04:09:42 +00:00
2023-01-06 10:54:34 +00:00
- add `grass::include!` macro to make it easier to include CSS at compile time
2023-01-07 17:32:51 +00:00
- various optimizations improving the bootstrap benchmark by ~30% and the bulma benchmark by ~15%
2023-01-03 04:09:42 +00:00
- improve error message for complex units in calculations
- more accurate formatting of named arguments in arglists when passed to `inspect(..)`
2023-01-07 04:17:05 +00:00
- more accurate formatting of nested lists with different separators when passed to `inspect(..)`
2023-01-03 04:09:42 +00:00
- support `$whiteness` and `$blackness` as arguments to `scale-color(..)`
- more accurate list separator from `join(..)`
- resolve unicode edge cases in `str-index(..)`
2023-01-03 23:25:34 +00:00
- more robust support for `@forward` prefixes
2023-01-07 04:17:05 +00:00
- allow strings as the first argument to `call(..)`
- bug fix: add back support for the `$css` argument to `get-function(..)` . regressed in 0.12.0
2023-01-03 04:09:42 +00:00
2022-12-28 22:34:58 -05:00
# 0.12.0
2022-12-26 15:33:04 -05:00
- complete rewrite of parsing, evaluation, and serialization steps
- **implement the indented syntax**
- **implement plain CSS imports**
- support for custom properties
- represent all numbers as f64, rather than using arbitrary precision
- implement media query merging
- implement builtin function `keywords`
- implement Infinity and -Infinity
- implement the `@forward` rule
- feature complete parsing of `@supports` conditions
- support media queries level 4
- implement calculation simplification and the calculation value type
- implement builtin fns `calc-args` , `calc-name`
- add builtin math module variables `$epsilon` , `$max-safe-integer` , `$min-safe-integer` , `$max-number` , `$min-number`
- allow angle units `turn` and `grad` in builtin trigonometry functions
- implement `@at-root` conditions
- implement `@import` conditions
- remove dependency on `num-rational` and `beef`
- support control flow inside declaration blocks
2023-02-18 15:08:43 -05:00
For example:
2022-12-26 15:33:04 -05:00
```scss
a {
-webkit-: {
@if 1 == 1 {
2023-02-18 15:08:43 -05:00
scrollbar: red;
2022-12-26 15:33:04 -05:00
}
}
}
```
will now emit
```css
a {
-webkit-scrollbar: red;
}
```
2023-02-18 15:08:43 -05:00
2022-12-26 15:33:04 -05:00
- always emit `rgb` /`rgba` /`hsl` /`hsla` for colors declared as such in expanded mode
- more efficiently compress colors in compressed mode
- treat `:where` the same as `:is` in extension
- support "import-only" files
- treat `@elseif` the same as `@else if`
- implement division of non-comparable units and feature complete support for complex units
- support 1 arg color.hwb()
2022-09-03 19:42:27 -04:00
# 0.11.2
- make `grass::Error` a `Send` type
- expose more internals of `grass::Error` , allowing for custom formatting
- fix WASM builds
2022-09-02 16:22:15 -04:00
# 0.11.1
2023-02-18 15:08:43 -05:00
- fix load path bug in which paths were searched for relative to the SCSS file, not the executable (#57 )
2022-09-02 16:22:15 -04:00
2022-02-04 09:41:10 +11:00
# 0.11.0
- `fs` option added to allow interception and reimplementation of all file system operations (such as imports)
- `wasm` feature renamed to/replaced with `wasm-exports` , which no longer materially alters the API: `from_path` is reinstated, and `from_string` once again returns the full error type; but the WASM export `from_string` (which returns a string error) is now a new function `from_string_js` . (It was renamed from `wasm` to `wasm-exports` because the name was misleading; Rust code that uses grass doesn’ t need this feature, it’ s solely to get this `from_string` WASM export.)
2021-09-20 21:32:51 -04:00
# 0.10.8
- bugfix: properly emit the number `0` in compressed mode (#53 )
2021-08-15 23:33:54 -04:00
# 0.10.7
2021-07-30 07:38:21 -04:00
- special case plain CSS fn `clamp`
- support more uses of plain CSS fns inside `rgb` /`rgba` /`hsl` /`hsla`
- better support for `@at-root` at the toplevel and inside media queries
2021-08-15 23:33:54 -04:00
- bugfixes for the module system
- more robust handling of load paths that are directories
2021-07-30 07:38:21 -04:00
2021-07-25 13:02:58 -04:00
# 0.10.6
2021-07-19 19:52:09 -04:00
2021-07-24 19:17:29 -04:00
- **feature complete, byte-for-byte support for bootstrap**
- add bootstrap v5.0.2 to ci
- run script to verify output against the last 2,500 commits to bootstrap
2021-07-19 19:52:09 -04:00
- feature complete `min` /`max` support -- special functions and `min` /`max` are now allowed as arguments
- removed dependency on `peekmore` , which sped up parsing and simplified lookahead
- emit comments inside the `@if` rule body
2021-07-30 07:38:21 -04:00
- fix bug in `hue(...)` function in which the value would be incorrect when the `red` channel was the highest and the green channel was lower than the blue channel
2021-07-19 19:52:09 -04:00
- no longer round output from `saturation(...)` function
2021-07-24 19:17:29 -04:00
- improve handling of newlines for `@media` , `@supports` , `@at-root` , placeholder selectors, unrelated style rules, and unknown @-rules
2021-07-21 09:12:50 -04:00
- arglists can be equal to comma separated lists
2021-07-21 22:56:10 -04:00
- throw error for invalid uses of `@charset`
- more robustly parse `@else if` , allowing escaped and uppercase characters
2021-07-24 19:17:29 -04:00
- resolve two `@extend` bugs -- one in which we would incorrectly emit `a b, a > b` as a selector, even though `a b` is a superselector of `a > b` , and a feature called "three-level extend loop", in which a stylesheet where `a` extends `b` , `b` extends `c` , and `c` extends `a` would fail to include all 3 selectors in certain places
2021-07-25 13:02:58 -04:00
- support compressed values for comma separated lists and numbers
- more robustly parse unknown @-rules
2021-07-19 19:52:09 -04:00
2021-07-10 12:57:02 -04:00
# 0.10.5
- support compressed output
- support new builtin functions `math.div` , `map.set`
- support the HWB colorspace and builtin functions `color.hwb` , `color.blackness` , `color.whiteness`
- `:is` pseudo selector is now considered an alias of `:matches` in `@extend`
- support `$keys...` argument in `map.merge`
2021-07-21 22:56:10 -04:00
- `%` now implements the modulo operation, rather than finding the remainder. this largely affects negative numbers
2021-07-10 12:57:02 -04:00
- fix parsing bug in which `/***/` in a selector would miss the closing `/`
2020-11-16 03:47:54 -05:00
# 0.10.4
2021-07-10 12:57:02 -04:00
- plain css `invert(..)` accepts numbers with any unit
- plain css imports (e.g. `@import url(foo)` or `@import "foo.css"` ) are now emitted at the top of documents
2020-11-16 03:47:54 -05:00
2020-08-15 22:25:11 -04:00
# 0.10.3
2021-07-10 12:57:02 -04:00
- hyphen followed by interpolation is not treated as subtraction, e.g. `10-#{10}` => `10 -10` rather than `0`
- function arguments do not affect variables in outer scopes (fixes [#37 ](https://github.com/connorskees/grass/issues/37 ))
- improve error messages for NaN with units passed to builtin functions
2020-08-15 22:25:11 -04:00
2020-08-14 15:55:07 -04:00
# 0.10.2
2021-07-10 12:57:02 -04:00
- use `std::fs::OpenOptions` to open files ([#35 ](https://github.com/connorskees/grass/pull/35 ) by [@MidasLamb ](https://github.com/MidasLamb ))
2020-08-14 15:55:07 -04:00
2020-08-12 16:27:16 -04:00
# 0.10.1
2020-08-07 02:24:17 -04:00
2021-07-10 12:57:02 -04:00
- **implement `@use` and the module system**
- support the filter syntax for function arguments, e.g. `alpha(opacity=1)`
- disallow certain at-rules in functions, resolving several panics
- allow vendor-prefixed special CSS functions, e.g. `-webkit-calc(...)`
- allow decimal percent selectors inside `@keyframes`
- allow vendor-prefixed `@keyframes`
- resolve parsing bug for maps involving silent comments
- allow escaped `!` in selectors
- allow multiline comments in functions
- resolve several panics on malformed input when parsing bracketed lists
- support NaN in all contexts
- add support for unicode ranges
- recognize plain CSS imports beginning with `//` , e.g. `@import "//fonts.googleapis.com/css?family=Droid+Sans";`
2021-07-21 22:56:10 -04:00
- resolve integer overflows in `@for` when bounds were equal to `i32::MIN` and `i32::MAX`
2021-07-10 12:57:02 -04:00
- allow quoted strings in default function arguments
2020-08-07 02:24:17 -04:00
2020-07-24 23:49:26 -04:00
# 0.10.0
2020-07-06 20:08:23 -04:00
2021-07-10 12:57:02 -04:00
- bugfixes for `@media` query regressions
- bugfixes for maps, arglists, and `@each`
- implement string interning for identifiers and style properties
- implement spec-compliant variable scoping
- emit `@import` when importing `url(...)` or `*.css`
- resolve all panics for malformed `@import`
- various optimizations that now allow us to compile bootstrap 10% faster than `libsass`
- errors inside builtin functions use `inspect` to print values
- bugfixes for color and map equality (e.g. `red` == `#ff0000` )
- hide unimplemented command line flags
- implement CLI options for `--quiet` , `--load-path` ([#22 ](https://github.com/connorskees/grass/pull/22 ) by @JosephLing ), `--no-charset` , `--stdin` , and `--no-unicode`
- use unicode characters in error messages by default
- allow comma separated `@import` statements ([#23 ](https://github.com/connorskees/grass/pull/23 ) by @JosephLing )
- implement and correctly parse `!optional` in `@extend`
- lazily evaluate `!default` variable values
- disallow interpolation in mixin and function names
- improve parsing for `@supports` and unknown at-rules
2020-07-24 23:49:26 -04:00
## Breaking
2021-07-10 12:57:02 -04:00
- functions now take an `Options` struct
2020-07-06 20:08:23 -04:00
2020-07-06 10:24:29 -04:00
# 0.9.5
A small release fixing potential build issues and improving documentation.
This release is not published to NPM due to [a bug ](https://github.com/rustwasm/wasm-pack/issues/837 )
in `wasm-pack` .
2020-07-04 21:30:42 -04:00
# 0.9.4
2020-07-04 20:50:53 -04:00
- implement `@keyframes`
2020-07-04 21:30:42 -04:00
- don't strip newlines following comments in selectors
2020-07-04 20:50:53 -04:00
2020-07-04 14:38:12 -04:00
# 0.9.3
2020-07-03 23:49:31 -04:00
2020-07-04 20:50:53 -04:00
- fix parsing bugs for empty bracketed lists
- partially implement inverse units
- remove all remaining `todo!()` s from binary and unary ops
- parse keywords case sensitively
- various optimizations that make bulma about _6x faster_ to compile
2020-07-03 23:49:31 -04:00
2020-06-22 11:07:54 -04:00
# 0.9.2
2020-06-23 04:36:15 -04:00
- implement builtin functions `min` and `max`
- bugfixes for `@extend` and `selector-unify`
2020-07-02 10:51:49 -04:00
- allow `@content` to take arguments
2020-07-03 21:21:26 -04:00
- bugfixes for `@content` , for example it will no longer infinitely recurse for chained mixins
2020-07-03 06:53:55 -04:00
- better support queries in `@media`
2020-07-02 10:51:49 -04:00
- bugfixes for `@media`
2020-07-03 06:53:55 -04:00
- add support for splats, e.g. `rgba([1, 2, 3, 4]...)`
- resolve a number of parsing bugs for `@for` , variable declarations, selectors, and maps
2020-07-03 21:21:26 -04:00
- completely rewrite how styles are evaluated, allowing short circuiting of values like `false and unit(foo)` and `if(true, foo, unit(foo)`
2020-06-22 11:07:54 -04:00
2020-06-16 22:00:45 -04:00
# 0.9.1
2020-06-18 18:14:35 -04:00
2020-06-20 06:31:43 -04:00
This release is largely focused on `@extend` , but it also resolves some regressions resulting from the new parser.
2020-06-23 04:36:15 -04:00
- **implement `@extend` **
- properly document new API
- MVP implementation of `@supports`
- fix regression in which `@at-root` would panic when placed after a ruleset
- fix regression related to `@mixin` and `@function` scoping when combined with outer, local variables
- remove most remaining `unwrap` s that could result in a panic
2020-06-16 22:00:45 -04:00
2020-06-16 20:40:19 -04:00
# 0.9.0
This release is focused on setting up the groundwork for implementing `@extend` as well
as being able to compile Bootstrap.
2020-06-23 04:36:15 -04:00
- implement all builtin selector functions
- `selector-append`
- `selector-extend`
- `selector-nest`
- `selector-parse`
- `selector-replace`
- `selector-unify`
- `simple-selectors`
- `is-superselector`
- implement builtin function `content-exists`
- allow `@import` , `@warn` , and `@debug` in all contexts, such as inside `@mixin`
- refactor control flow evaluation, resolving some issues blocking Bootstrap
2020-06-16 20:40:19 -04:00
#### Breaking Changes
2020-06-23 04:36:15 -04:00
- remove the `StyleSheet` struct in favor of freestanding functions, `from_string` and `from_path`
2020-06-16 20:40:19 -04:00
2020-05-25 16:23:10 -04:00
# 0.8.3
This release is largely focused on performance and robustness
2020-06-23 04:36:15 -04:00
- implement smallint optimization for numbers, making some benchmarks 50% faster
- remove `bimap` as a dependency for storing named colors in favor of an ad hoc, more specialized data structure
- remove _dozens_ of panics on malformed input
- use `beef::Cow` instead of `std::borrow::Cow`
- increase code coverage to 80%
2020-05-25 16:23:10 -04:00
# 0.8.2
This release contains significant (>10x) improvements for WASM speed.
Performance is now comparable to libsass bindings with `node-sass` as
well as `dart-sass` with dart2js. It is, however, roughly 4x slower than
native `grass` .