Skip to content

Commit

Permalink
add line-numbers color option
Browse files Browse the repository at this point in the history
  • Loading branch information
junghoocho authored and antonmedv committed Jun 17, 2020
1 parent 6f3bbf6 commit 3138a9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linenumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ type Options = {
class: string
wrapClass: string
width: string
backgroundColor: string
color: string
}

export function withLineNumbers(
Expand Down Expand Up @@ -53,8 +55,8 @@ function init(editor: HTMLElement, opts: Options): HTMLElement {
lineNumbers.style.bottom = "0px"
lineNumbers.style.width = opts.width
lineNumbers.style.overflow = "hidden"
lineNumbers.style.backgroundColor = "rgba(255, 255, 255, 0.05)"
lineNumbers.style.color = "#fff"
lineNumbers.style.backgroundColor = opts.backgroundColor || "rgba(255, 255, 255, 0.05)"
lineNumbers.style.color = opts.color || css.color
lineNumbers.style.setProperty("mix-blend-mode", "difference")

// Copy editor styles
Expand Down

0 comments on commit 3138a9d

Please sign in to comment.