mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-27 04:34:59 +01:00
parent
821b5e2521
commit
47e0cfc8c8
@ -20,6 +20,11 @@
|
||||
inserts at the end of the string if the `$index` is `-1`. This matches the
|
||||
behavior in LibSass and originally in Ruby Sass.
|
||||
|
||||
* **Potentially breaking bug fix**: An empty map returned by `map-remove()` is
|
||||
now treated as identical to the literal value `()`, rather than being treated
|
||||
as though it had a comma separator. This matches the original behavior in Ruby
|
||||
Sass.
|
||||
|
||||
* The `adjust-color()` function no longer throws an error when a large `$alpha`
|
||||
value is combined with HSL adjustments.
|
||||
|
||||
|
@ -10,7 +10,8 @@ import 'external/value.dart' as ext;
|
||||
class SassMap extends Value implements ext.SassMap {
|
||||
final Map<Value, Value> contents;
|
||||
|
||||
ListSeparator get separator => ListSeparator.comma;
|
||||
ListSeparator get separator =>
|
||||
contents.isEmpty ? ListSeparator.undecided : ListSeparator.comma;
|
||||
|
||||
List<Value> get asList {
|
||||
var result = <Value>[];
|
||||
|
@ -15,7 +15,7 @@ main() {
|
||||
SassMap value;
|
||||
setUp(() => value = parseValue("(a: b, c: d)") as SassMap);
|
||||
|
||||
test("is comma-separated", () {
|
||||
test("has an undecided separator", () {
|
||||
expect(value.separator, equals(ListSeparator.comma));
|
||||
});
|
||||
|
||||
@ -143,8 +143,8 @@ main() {
|
||||
SassMap value;
|
||||
setUp(() => value = parseValue("map-remove((a: b), a)") as SassMap);
|
||||
|
||||
test("is comma-separated", () {
|
||||
expect(value.separator, equals(ListSeparator.comma));
|
||||
test("has an undecided separator", () {
|
||||
expect(value.separator, equals(ListSeparator.undecided));
|
||||
});
|
||||
|
||||
test("returns its contents as a map", () {
|
||||
|
Loading…
Reference in New Issue
Block a user