Skip to content

Commit

Permalink
chore: add css variable for data-flow bubble (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusZdroba authored Dec 13, 2024
1 parent c5baafe commit 348cd7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Snyk.VisualStudio.Extension.2022/UI/Html/BaseHtmlProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,19 @@ public virtual string ReplaceCssVariables(string html)
css += GetCss();

css += "</style>";
var borderColor = VSColorTheme.GetThemedColor(EnvironmentColors.AccessKeyToolTipColorKey).ToHex();

html = html.Replace("${ideStyle}", css);
html = html.Replace("<style nonce=\"ideNonce\" data-ide-style></style>", css);
html = html.Replace("var(--default-font)", " ui-sans-serif, \"SF Pro Text\", \"Segoe UI\", \"Ubuntu\", Tahoma, Geneva, Verdana, sans-serif;");
html = html.Replace("var(--text-color)", VSColorTheme.GetThemedColor(EnvironmentColors.BrandedUITextBrushKey).ToHex());
html = html.Replace("var(--background-color)", VSColorTheme.GetThemedColor(EnvironmentColors.ComboBoxPopupBackgroundEndBrushKey).ToHex());
html = html.Replace("var(--border-color)", VSColorTheme.GetThemedColor(EnvironmentColors.AccessKeyToolTipColorKey).ToHex());
html = html.Replace("var(--border-color)", borderColor);
html = html.Replace("var(--link-color)", VSColorTheme.GetThemedColor(EnvironmentColors.PanelHyperlinkBrushKey).ToHex());
html = html.Replace("var(--horizontal-border-color)", VSColorTheme.GetThemedColor(EnvironmentColors.ClassDesignerDefaultShapeTextBrushKey).ToHex());
html = html.Replace("var(--code-background-color)", VSColorTheme.GetThemedColor(EnvironmentColors.EditorExpansionFillBrushKey).ToHex());

html = html.Replace("var(--circle-color)", borderColor);

var ideHeaders = """
<head>
<meta http-equiv='Content-Type' content='text/html; charset=unicode' />
Expand Down

0 comments on commit 348cd7a

Please sign in to comment.