Skip to content

Commit

Permalink
fix(preprocess): patch for 1.2.20 (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri authored Sep 10, 2023
1 parent 2d95a95 commit 3321a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ func colorVariableReplace(content string) string {
}

func colorVariableReplaceForJS(content string) string {
utils.Replace(&content, `"#1db954"`, `getComputedStyle(document.body).getPropertyValue("--spice-button").trim()`)
utils.Replace(&content, `"#b3b3b3"`, `getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim()`)
utils.Replace(&content, `"#ffffff"`, `getComputedStyle(document.body).getPropertyValue("--spice-text").trim()`)
utils.Replace(&content, `"#1db954"`, ` getComputedStyle(document.body).getPropertyValue("--spice-button").trim()`)
utils.Replace(&content, `"#b3b3b3"`, ` getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim()`)
utils.Replace(&content, `"#ffffff"`, ` getComputedStyle(document.body).getPropertyValue("--spice-text").trim()`)
utils.Replace(&content, `color:"white"`, `color:"var(--spice-text)"`)
return content
}
Expand Down

0 comments on commit 3321a5b

Please sign in to comment.