Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/jaspr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
- Fixed hydration of nullable `@client` parameters that use custom codecs when their value is `null`.
- Fixed the server output of a client component that renders `<head>` when the document has no `<body>`.
- Fixed the `hasOuterHtml` matcher from `jaspr_test` never matching when compiled to Wasm.
- Fixed `Animation(count: double.infinity)` rendering `infinity` instead of `infinite`, which made the browser drop the whole `animation` declaration.

## 0.23.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class _Animation implements Animation {
var val = '${duration.inMilliseconds}ms';
if (curve != null) val += ' ${curve!.value}';
if (delay != null) val += ' ${delay!.inMilliseconds}ms';
if (count != null) val += ' ${count!.numstr}';
// `animation-iteration-count` takes the keyword `infinite`, not `infinity`.
if (count != null) val += ' ${count!.isInfinite ? 'infinite' : count!.numstr}';
if (direction != null) val += ' ${direction!.value}';
if (fillMode != null) val += ' ${fillMode!.value}';
if (playState != null) val += ' ${playState!.value}';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@ void main() {
expect(
styles.properties,
equals({
'animation': '500ms linear(0.2 30% 60%, 0.3 40% 80.5%) 100ms infinity normal forwards running slide',
'animation': '500ms linear(0.2 30% 60%, 0.3 40% 80.5%) 100ms infinite normal forwards running slide',
}),
);
});

test('finite count', () {
const styles = Styles(
animation: Animation(name: 'pulse', duration: Duration(seconds: 1), count: 2.5),
);
expect(styles.properties, equals({'animation': '1000ms 2.5 pulse'}));
});

group('combine', () {
test('basic', () {
const animations = Animation.list([
Expand Down