Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}");

Expand Down Expand Up @@ -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}");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down