From 6aee49bad3fab1885970d4a211cb43bb6489b30a Mon Sep 17 00:00:00 2001 From: Bob Fanger Date: Wed, 15 Mar 2023 12:40:49 +0100 Subject: [PATCH] feat: css units in fly & blur transitions (#7623) Closes #6050 --------- Co-authored-by: Bob Fanger Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- site/content/docs/04-run-time.md | 7 ++++--- src/runtime/internal/utils.ts | 5 +++++ src/runtime/transition/index.ts | 17 +++++++++-------- test/utils/index.ts | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/site/content/docs/04-run-time.md b/site/content/docs/04-run-time.md index 46d025fe3e..440d8aeccf 100644 --- a/site/content/docs/04-run-time.md +++ b/site/content/docs/04-run-time.md @@ -693,7 +693,7 @@ Animates a `blur` filter alongside an element's opacity. * `duration` (`number`, default 400) — milliseconds the transition lasts * `easing` (`function`, default `cubicInOut`) — an [easing function](/docs#run-time-svelte-easing) * `opacity` (`number`, default 0) - the opacity value to animate out to and in from -* `amount` (`number`, default 5) - the size of the blur in pixels +* `amount` (`number | string`, default 5) - the size of the blur. Supports css units (for example: `"4rem"`). The default unit is `px` ```sv