From a4f075271f741dc402589c65719a2458a5622eb4 Mon Sep 17 00:00:00 2001 From: Isabell Date: Mon, 15 May 2023 13:30:42 +1000 Subject: [PATCH] add fade to MFM options --- packages/client/src/components/mfm.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 7e3c143357..7275c66873 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -253,6 +253,16 @@ export default defineComponent({ style = `background-color: #${color};`; break; } + case "fade": { + const direction = token.props.args.out + ? "alternate-reverse" + : "alternate"; + const speed = validTime(token.props.args.speed) || "1.5s"; + style = + this.$store.state.animatedMfm && !reducedMotion() + ? `animation: mfm-fade ${speed} linear infinite; animation-direction: ${direction};` + : ""; + } } if (style == null) { return h("span", {}, [