diff --git a/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveCardRenderer.cs b/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveCardRenderer.cs index fb65de4b02..4fe769ccd6 100644 --- a/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveCardRenderer.cs +++ b/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveCardRenderer.cs @@ -944,7 +944,7 @@ protected static HtmlTag TextBlockRender(AdaptiveTextBlock textBlock, AdaptiveRe .Style("box-sizing", "border-box") .Style("text-align", textBlock.HorizontalAlignment.ToString().ToLower()) .Style("color", context.GetColor(textBlock.Color, textBlock.IsSubtle, false)) - .Style("line-height", $"{lineHeight.ToString("F")}px") + .Style("line-height", $"{lineHeight.ToString("F", System.Globalization.CultureInfo.InvariantCulture)}px") .Style("font-size", $"{fontSize}px") .Style("font-weight", $"{weight}"); @@ -1065,7 +1065,7 @@ protected static HtmlTag TextRunRender(AdaptiveTextRun textRun, AdaptiveRenderCo var uiTextRun = new HtmlTag("span", true) .AddClass($"ac-{textRun.Type.Replace(".", "").ToLower()}") .Style("color", context.GetColor(textRun.Color, textRun.IsSubtle, false)) - .Style("line-height", $"{lineHeight.ToString("F")}px") + .Style("line-height", $"{lineHeight.ToString("F", System.Globalization.CultureInfo.InvariantCulture)}px") .Style("font-size", $"{fontSize}px") .Style("font-weight", $"{weight}"); diff --git a/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveRenderContext.cs b/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveRenderContext.cs index 1ebbce0b50..23c6aa82eb 100644 --- a/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveRenderContext.cs +++ b/source/dotnet/Library/AdaptiveCards.Rendering.Html/AdaptiveRenderContext.cs @@ -144,7 +144,7 @@ public string GetRGBColor(string color) if (color.Length == 9) { var opacity = (float)Convert.ToByte(color.Substring(1, 2), 16) / Byte.MaxValue; - return $"rgba({Convert.ToByte(color.Substring(3, 2), 16)}, {Convert.ToByte(color.Substring(5, 2), 16)}, {Convert.ToByte(color.Substring(7, 2), 16)}, {opacity.ToString("F")})"; + return $"rgba({Convert.ToByte(color.Substring(3, 2), 16)}, {Convert.ToByte(color.Substring(5, 2), 16)}, {Convert.ToByte(color.Substring(7, 2), 16)}, {opacity.ToString("F", System.Globalization.CultureInfo.InvariantCulture)})"; } } return color;