From 5713ab4123b7cfacb18681ab3601fb9189d06a47 Mon Sep 17 00:00:00 2001 From: pancakes Date: Tue, 25 Mar 2025 10:53:03 +1000 Subject: [PATCH] [frontend/mfm] Add fallback fg and bg fn values --- Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs index 56e52680..fc6187c1 100644 --- a/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs +++ b/Iceshrimp.Frontend/Core/Miscellaneous/RenderMfm.cs @@ -472,6 +472,8 @@ public static partial class MfmRenderer if (args.TryGetValue("color", out var color) && ValidColor(color)) el.SetAttribute("style", $"display: inline-block; color: #{color};"); + else + el.SetAttribute("style", $"display: inline-block; color: #f00;"); return el; } @@ -482,6 +484,8 @@ public static partial class MfmRenderer if (args.TryGetValue("color", out var color) && ValidColor(color)) el.SetAttribute("style", $"display: inline-block; background-color: #{color};"); + else + el.SetAttribute("style", $"display: inline-block; background-color: #f00;"); return el; }