Skip to content

Commit

Permalink
chore: replace css variable (#639)
Browse files Browse the repository at this point in the history
* chore: replace css variable

* chore: refactor css variables
  • Loading branch information
DariusZdroba authored Dec 16, 2024
1 parent d85d05a commit 8ce9666
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ class ThemeBasedStylingGenerator {
html = html.replace("var(--tab-item-github-icon-color)", toCssHex(JBUI.CurrentTheme.Tree.FOREGROUND))
html = html.replace("var(--tab-item-hover-color)", toCssHex(JBUI.CurrentTheme.DefaultTabs.underlineColor()))
html = html.replace("var(--tabs-bottom-color)", toCssHex(JBUI.CurrentTheme.DefaultTabs.background()))
html = html.replace("var(--border-color)", toCssHex(JBUI.CurrentTheme.CustomFrameDecorations.separatorForeground()))
html = html.replace("var(--border-color)", borderColor)
html = html.replace("var(--editor-color)", toCssHex(UIUtil.getTextFieldBackground()))
html = html.replace("var(--label-color)", toCssHex(JBUI.CurrentTheme.Label.foreground()))
html = html.replace("var(--container-background-color)", toCssHex(UIUtil.getTextFieldBackground()))
html = html.replace("var(--generated-ai-fix-button-background-color)", toCssHex(JBUI.CurrentTheme.Button.defaultButtonColorStart()))
html = html.replace("var(--dark-button-border-default)", toCssHex(JBUI.CurrentTheme.CustomFrameDecorations.separatorForeground()))
html = html.replace("var(--dark-button-border-default)", borderColor)
html = html.replace("var(--dark-button-default)", toCssHex(JBUI.CurrentTheme.Button.defaultButtonColorStart()))
html = html.replace("var(--disabled-background-color)", borderColor)
html = html.replace(
"var(--code-background-color)",
editorBackground
Expand All @@ -66,6 +67,7 @@ class ThemeBasedStylingGenerator {
"var(--editor-color)",
editorBackground
)
html = html.replace("var(--circle-color)", borderColor)
val contrast = if (isHighContrast) "high-contrast" else ""
val theme = if (isDarkTheme) "dark" else "light"
val lineWithBody = html.lines().find { it.contains("<body") }
Expand Down

0 comments on commit 8ce9666

Please sign in to comment.