Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for the relative color syntax of CSS Color 5 #2098

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 1.68.1
## 1.69.0

* Add support for the relative color syntax from CSS Color 5. This syntax
cannot be used to create Sass color values. It is always emitted as-is in the
CSS output.

### Dart API

Expand Down
5 changes: 5 additions & 0 deletions lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,11 @@ Object /* SassString | List<Value> */ _parseChannels(
}

var list = channels.asList;
if (list case [SassString(:var text, hasQuotes: false), _, ...]
when equalsIgnoreCase(text, "from")) {
return _functionString(name, [originalChannels]);
}

if (list.length > 3) {
throw SassScriptException("Only 3 elements allowed, but ${list.length} "
"were passed.");
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.68.1-dev
version: 1.69.0-dev
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down