Skip to content

Commit

Permalink
Fix JS API legacy SassColor.change (#2368)
Browse files Browse the repository at this point in the history
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
  • Loading branch information
ntkme and nex3 committed Sep 28, 2024
1 parent 72612c4 commit f84e867
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.79.4

### JS API

* Fix a bug where passing `green` or `blue` to `color.change()` for legacy
colors would fail.

## 1.79.3

* Update the `$channel` parameter in the suggested replacement for
Expand Down
4 changes: 3 additions & 1 deletion lib/src/js/value/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ final JSClass colorClass = () {
hasProperty(options, 'saturation') ||
hasProperty(options, 'lightness')) {
space = ColorSpace.hsl;
} else if (hasProperty(options, 'red')) {
} else if (hasProperty(options, 'red') ||
hasProperty(options, 'green') ||
hasProperty(options, 'blue')) {
space = ColorSpace.rgb;
}
if (space != self.space) {
Expand Down
4 changes: 4 additions & 0 deletions pkg/sass-parser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.3

* No user-visible changes.

## 0.2.2

* No user-visible changes.
Expand Down
2 changes: 1 addition & 1 deletion pkg/sass-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-parser",
"version": "0.2.2",
"version": "0.2.3",
"description": "A PostCSS-compatible wrapper of the official Sass parser",
"repository": "sass/sass",
"author": "Google Inc.",
Expand Down
4 changes: 4 additions & 0 deletions pkg/sass_api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 12.0.4

* No user-visible changes.

## 12.0.3

* No user-visible changes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 12.0.3
version: 12.0.4
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
sass: 1.79.3
sass: 1.79.4

dev_dependencies:
dartdoc: ^8.0.14
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.79.3
version: 1.79.4
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit f84e867

Please sign in to comment.