Skip to content

Commit ff56fc5

Browse files
stofnex3
andauthoredSep 28, 2023
Implement support for the relative color syntax of CSS Color 5 (#2098)
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
1 parent 00823e0 commit ff56fc5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
 

‎CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 1.68.1
1+
## 1.69.0
2+
3+
* Add support for the relative color syntax from CSS Color 5. This syntax
4+
cannot be used to create Sass color values. It is always emitted as-is in the
5+
CSS output.
26

37
### Dart API
48

‎lib/src/functions/color.dart

+5
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,11 @@ Object /* SassString | List<Value> */ _parseChannels(
736736
}
737737

738738
var list = channels.asList;
739+
if (list case [SassString(:var text, hasQuotes: false), _, ...]
740+
when equalsIgnoreCase(text, "from")) {
741+
return _functionString(name, [originalChannels]);
742+
}
743+
739744
if (list.length > 3) {
740745
throw SassScriptException("Only 3 elements allowed, but ${list.length} "
741746
"were passed.");

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.68.1-dev
2+
version: 1.69.0-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)
Please sign in to comment.