Skip to content

Commit 2ad2133

Browse files
authored
Don't emit warnings for plain-CSS invert() (#2394)
Fixes sass/sass#3963. Fixes #2393.
1 parent e6391d3 commit 2ad2133

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.80.2
2+
3+
* Fix a bug where deprecation warnings were incorrectly emitted for the
4+
plain-CSS `invert()` function.
5+
16
## 1.80.1
27

38
* Fix a bug where repeated deprecation warnings were not automatically limited.

lib/src/functions/color.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ final global = UnmodifiableListView([
5555
space: ColorSpace.rgb, name: 'channels')
5656
}),
5757

58-
_function("invert", r"$color, $weight: 100%, $space: null",
59-
(arguments) => _invert(arguments, global: true))
60-
.withDeprecationWarning("color"),
58+
_function("invert", r"$color, $weight: 100%, $space: null", (arguments) {
59+
if (arguments[0] is! SassNumber && !arguments[0].isSpecialNumber) {
60+
warnForGlobalBuiltIn("color", "invert");
61+
}
62+
return _invert(arguments, global: true);
63+
}),
6164

6265
// ### HSL
6366
_channelFunction("hue", ColorSpace.hsl, (color) => color.hue,

pkg/sass-parser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.2
2+
3+
* No user-visible changes.
4+
15
## 0.3.1
26

37
* No user-visible changes.

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-parser",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "A PostCSS-compatible wrapper of the official Sass parser",
55
"repository": "sass/sass",
66
"author": "Google Inc.",

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 13.1.2
2+
3+
* No user-visible changes.
4+
15
## 13.1.1
26

37
* Make `AsyncImporterCache.wrapLogger()` and `ImporterCache.wrapLogger()` always

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 13.1.1
5+
version: 13.1.2
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.0.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.80.1
13+
sass: 1.80.2
1414

1515
dev_dependencies:
1616
dartdoc: ^8.0.14

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.80.1
2+
version: 1.80.2
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)