- support
...$keysargument tomap-has-key(..)/map.has-key(..) - parse aliased colors (e.g.
cyanforaqua) as colors rather than identifiers
- implement builtin string-module function
string.split(..)(#96) by @xpe - implement functionality for intercepting logs (#93) by cryocz
- 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
- update
clapdependency to 4.x.x to silenceattysecurity warning - bump MSRV to 1.64.0 for new
clapversion - fix bug in which
--no-charsetflag wasn't respected
- 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
...$keysargument tomap-get(..)/map.get(..)(#83)
- implement builtin map-module functions
map.deep-merge(..)andmap.deep-remove(..)
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.
- implement an import cache, significantly improving the performance of certain pathological cases
- slash lists can be compared using
== - resolve rounding errors for extremely large numbers
- potentially breaking bug fixes in certain color functions
color.hwb(..)no longer allows whiteness or blackness values outside the bounds 0% to 100%scale-color(..)no longer allows the$hueargument. previously it was ignoredscale-color(..),change-color(..), andadjust-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) todeg. 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" - fix bug in which whitespace was not emitted between
+or-inside calc for compressed output (#71 by @ModProg)
- add
grass::include!macro to make it easier to include CSS at compile time - various optimizations improving the bootstrap benchmark by ~30% and the bulma benchmark by ~15%
- improve error message for complex units in calculations
- more accurate formatting of named arguments in arglists when passed to
inspect(..) - more accurate formatting of nested lists with different separators when passed to
inspect(..) - support
$whitenessand$blacknessas arguments toscale-color(..) - more accurate list separator from
join(..) - resolve unicode edge cases in
str-index(..) - more robust support for
@forwardprefixes - allow strings as the first argument to
call(..) - bug fix: add back support for the
$cssargument toget-function(..). regressed in 0.12.0
- 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
@forwardrule - feature complete parsing of
@supportsconditions - 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
turnandgradin builtin trigonometry functions - implement
@at-rootconditions - implement
@importconditions - remove dependency on
num-rationalandbeef - support control flow inside declaration blocks For example:
a {
-webkit-: {
@if 1 == 1 {
scrollbar: red;
}
}
}will now emit
a {
-webkit-scrollbar: red;
}- always emit
rgb/rgba/hsl/hslafor colors declared as such in expanded mode - more efficiently compress colors in compressed mode
- treat
:wherethe same as:isin extension - support "import-only" files
- treat
@elseifthe same as@else if - implement division of non-comparable units and feature complete support for complex units
- support 1 arg color.hwb()
- make
grass::ErroraSendtype - expose more internals of
grass::Error, allowing for custom formatting - fix WASM builds
- fix load path bug in which paths were searched for relative to the SCSS file, not the executable (#57)
fsoption added to allow interception and reimplementation of all file system operations (such as imports)wasmfeature renamed to/replaced withwasm-exports, which no longer materially alters the API:from_pathis reinstated, andfrom_stringonce again returns the full error type; but the WASM exportfrom_string(which returns a string error) is now a new functionfrom_string_js. (It was renamed fromwasmtowasm-exportsbecause the name was misleading; Rust code that uses grass doesn’t need this feature, it’s solely to get thisfrom_stringWASM export.)
- bugfix: properly emit the number
0in compressed mode (#53)
- special case plain CSS fn
clamp - support more uses of plain CSS fns inside
rgb/rgba/hsl/hsla - better support for
@at-rootat the toplevel and inside media queries - bugfixes for the module system
- more robust handling of load paths that are directories
- 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
- feature complete
min/maxsupport -- special functions andmin/maxare now allowed as arguments - removed dependency on
peekmore, which sped up parsing and simplified lookahead - emit comments inside the
@ifrule body - fix bug in
hue(...)function in which the value would be incorrect when theredchannel was the highest and the green channel was lower than the blue channel - no longer round output from
saturation(...)function - improve handling of newlines for
@media,@supports,@at-root, placeholder selectors, unrelated style rules, and unknown @-rules - arglists can be equal to comma separated lists
- throw error for invalid uses of
@charset - more robustly parse
@else if, allowing escaped and uppercase characters - resolve two
@extendbugs -- one in which we would incorrectly emita b, a > bas a selector, even thougha bis a superselector ofa > b, and a feature called "three-level extend loop", in which a stylesheet whereaextendsb,bextendsc, andcextendsawould fail to include all 3 selectors in certain places - support compressed values for comma separated lists and numbers
- more robustly parse unknown @-rules
- support compressed output
- support new builtin functions
math.div,map.set - support the HWB colorspace and builtin functions
color.hwb,color.blackness,color.whiteness :ispseudo selector is now considered an alias of:matchesin@extend- support
$keys...argument inmap.merge %now implements the modulo operation, rather than finding the remainder. this largely affects negative numbers- fix parsing bug in which
/***/in a selector would miss the closing/
- 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
- hyphen followed by interpolation is not treated as subtraction, e.g.
10-#{10}=>10 -10rather than0 - function arguments do not affect variables in outer scopes (fixes #37)
- improve error messages for NaN with units passed to builtin functions
- use
std::fs::OpenOptionsto open files (#35 by @MidasLamb)
- implement
@useand 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"; - resolve integer overflows in
@forwhen bounds were equal toi32::MINandi32::MAX - allow quoted strings in default function arguments
- bugfixes for
@mediaquery regressions - bugfixes for maps, arglists, and
@each - implement string interning for identifiers and style properties
- implement spec-compliant variable scoping
- emit
@importwhen importingurl(...)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
inspectto 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 by @JosephLing),--no-charset,--stdin, and--no-unicode - use unicode characters in error messages by default
- allow comma separated
@importstatements (#23 by @JosephLing) - implement and correctly parse
!optionalin@extend - lazily evaluate
!defaultvariable values - disallow interpolation in mixin and function names
- improve parsing for
@supportsand unknown at-rules
- functions now take an
Optionsstruct
A small release fixing potential build issues and improving documentation.
This release is not published to NPM due to a bug
in wasm-pack.
- implement
@keyframes - don't strip newlines following comments in selectors
- 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
- implement builtin functions
minandmax - bugfixes for
@extendandselector-unify - allow
@contentto take arguments - bugfixes for
@content, for example it will no longer infinitely recurse for chained mixins - better support queries in
@media - bugfixes for
@media - add support for splats, e.g.
rgba([1, 2, 3, 4]...) - resolve a number of parsing bugs for
@for, variable declarations, selectors, and maps - completely rewrite how styles are evaluated, allowing short circuiting of values like
false and unit(foo)andif(true, foo, unit(foo)
This release is largely focused on @extend, but it also resolves some regressions resulting from the new parser.
- implement
@extend - properly document new API
- MVP implementation of
@supports - fix regression in which
@at-rootwould panic when placed after a ruleset - fix regression related to
@mixinand@functionscoping when combined with outer, local variables - remove most remaining
unwraps that could result in a panic
This release is focused on setting up the groundwork for implementing @extend as well
as being able to compile Bootstrap.
- implement all builtin selector functions
selector-appendselector-extendselector-nestselector-parseselector-replaceselector-unifysimple-selectorsis-superselector
- implement builtin function
content-exists - allow
@import,@warn, and@debugin all contexts, such as inside@mixin - refactor control flow evaluation, resolving some issues blocking Bootstrap
- remove the
StyleSheetstruct in favor of freestanding functions,from_stringandfrom_path
This release is largely focused on performance and robustness
- implement smallint optimization for numbers, making some benchmarks 50% faster
- remove
bimapas 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::Cowinstead ofstd::borrow::Cow - increase code coverage to 80%
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.