diff --git a/Iceshrimp.Frontend/Components/MfmText.razor.css b/Iceshrimp.Frontend/Components/MfmText.razor.css index c56000a7..bca9ae73 100644 --- a/Iceshrimp.Frontend/Components/MfmText.razor.css +++ b/Iceshrimp.Frontend/Components/MfmText.razor.css @@ -296,6 +296,72 @@ } } +@keyframes fn-twitch { + 0% { + transform: translate(7px, -2px) + } + 5% { + transform: translate(-3px, 1px) + } + 10% { + transform: translate(-7px, -1px) + } + 15% { + transform: translateY(-1px) + } + 20% { + transform: translate(-8px, 6px) + } + 25% { + transform: translate(-4px, -3px) + } + 30% { + transform: translate(-4px, -6px) + } + 35% { + transform: translate(-8px, -8px) + } + 40% { + transform: translate(4px, 6px) + } + 45% { + transform: translate(-3px, 1px) + } + 50% { + transform: translate(2px, -10px) + } + 55% { + transform: translate(-7px) + } + 60% { + transform: translate(-2px, 4px) + } + 65% { + transform: translate(3px, -8px) + } + 70% { + transform: translate(6px, 7px) + } + 75% { + transform: translate(-7px, -2px) + } + 80% { + transform: translate(-7px, -8px) + } + 85% { + transform: translate(9px, 3px) + } + 90% { + transform: translate(-3px, -2px) + } + 95% { + transform: translate(-10px, 2px) + } + to { + transform: translate(-2px, -6px) + } +} + ::deep { .fn-animation { display: inline-block; diff --git a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs index 36231003..3e930f7b 100644 --- a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs +++ b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs @@ -266,7 +266,7 @@ public static partial class MfmRenderer "bounce" => MfmFnAnimation(node.Name, args, document, "0.75s"), "spin" => MfmFnSpin(args, document), "shake" => MfmFnAnimation(node.Name, args, document, "0.5s"), - "twitch" => throw new NotImplementedException($"{node.Name}"), + "twitch" => MfmFnAnimation(node.Name, args, document, "0.5s"), "rainbow" => throw new NotImplementedException($"{node.Name}"), "sparkle" => throw new NotImplementedException($"{node.Name}"), "rotate" => MfmFnRotate(args, document),