add fade to MFM options

This commit is contained in:
Isabell 2023-05-15 13:30:42 +10:00
parent 006358540c
commit a4f075271f
1 changed files with 10 additions and 0 deletions

View File

@ -253,6 +253,16 @@ export default defineComponent({
style = `background-color: #${color};`; style = `background-color: #${color};`;
break; 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) { if (style == null) {
return h("span", {}, [ return h("span", {}, [